Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > Other ASP.NET > BOOK: Beginning Ajax with ASP.NET
BOOK: Beginning Ajax with ASP.NET
This is the forum to discuss the Wrox book Beginning Ajax with ASP.NET by Wallace B. McClure, Scott Cate, Paul Glavich, Craig Shoemaker; ISBN: 9780471785446
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Ajax with ASP.NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 15th, 2007, 03:59 PM
Registered User
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Page 85 - Returning Response Data as a String

I created the CreateXmlHttpRequestObject() function.
I created the following GET statement:
xmlHttpObj.open("GET","http://" + location.host + "/DataFile.xml", true);
Followed by the onreadystatechange function literal:
xmlHttpObj.orreadystatechange = function() {
   if (xmlHttpObj.readyState == 4)
       document.getElementById("divResults").childNodes(0 ).nodeValue = xmlHttpObj.responseText;
The Window alert brought up the four states:
    1 Loading
    2 Loaded
    3 Interactive
    4 Complete
I figured at this point it has located the file (located in c:\ajax\ directory) and that I'm good to go.
The text that got displayed in my div was a bunch of html that had an error of 404 (could not find file).

Why would the states go along fine if it was not locating the file correctly?


Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning an image from an ASP page dkb Classic ASP Basics 4 February 21st, 2008 01:20 AM
Returning current page number Larry Landis Word VBA 1 January 26th, 2007 09:23 AM
Error: Chapter 3 (try it out) page 85 dea0303 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 August 29th, 2006 05:47 PM
Returning to Parent page with refreshed New Data warrenb24 General .NET 0 February 22nd, 2005 08:45 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.