jQuery in Action, 3rd edition
The moose likes HTML, CSS and JavaScript and the fly likes Help with AJAX script Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Help with AJAX script" Watch "Help with AJAX script" New topic

Help with AJAX script

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 751
Hi, I was playing around with an AJAX script located here...


I just tried to modify some things and instead of using two listboxes, I used one... Here's the code...


and here's my xml file...

I wanted to display each item to the list... But this doesn't seem to happen... Actually... I don't think my script is being called at all! I tried putting alert() functions almost everywhere in my script so that I would know when it's called... Unfortunately... It's not... Any help? Thanks!

SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
I really did not look at the code, rather busy preparing for the holiday, but you have <script type="text/xml"> which is wrong. You are using JavaScript here, not XML.

Sanjiv Jivan
Ranch Hand

Joined: Nov 03, 2005
Posts: 52
Also make sure that your server returns the (XML) content with content type text/xml or else the browser parser will return null for req.responseXML

For any such issues I simply use the IE Javascript debugger. Helps me resolve issues in a matter of minutes.

I agree. Here's the link: http://aspose.com/file-tools
subject: Help with AJAX script
jQuery in Action, 3rd edition