Google Groups Home Help | Sign in
Message from discussion Siple AJAX, of course
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Monica Leko  
View profile
 More options May 9, 1:48 pm
Newsgroups: comp.lang.javascript
From: Monica Leko <monica.l...@gmail.com>
Date: Fri, 9 May 2008 10:48:34 -0700 (PDT)
Local: Fri, May 9 2008 1:48 pm
Subject: Siple AJAX, of course
Doesn't work.  :)

I am using Google maps example from book, and from Google
documentation.  It is really simple, and I don't know why isn't
working.  My browser send mi this response:

This XML file does not appear to have any style information associated
with it. The document tree is shown below.
<markers id="id je ok">
<marker found="Keychain" lat="37.441" left="Book" lng="-122.141"/>
<marker found="Water Bottle" lat="37.322" left="Necklace"
lng="-121.213"/>
</markers>

My code is following
var getVars =  "?q=" + search;
var request = GXmlHttp.create();
request.open('GET', '/lbs/' + getVars, true);
request.onreadystatechange = function() {
  if (request.readyState == 4) {
    var xmlDoc = request.responseXML;
    alert(xmlDoc);
    var responseNode = xmlDoc.getElementsByTagName('markers').item(0);
    var type = responseNode.getAttribute("id");
  }

}

responseXML allways sends back null value, although server sends back
XML.  And, what I don't understanf (still newbie), after the alert
popups and write "null", my browser render upper XML file, instead
doing nothing and show page from which I called AJAX function.  How
can this be?

    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google