p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning Ruby on Rails (http://p2p.wrox.com/forumdisplay.php?f=289)
-   -   ch11 "Using XML and Ajax" example doesn't work (http://p2p.wrox.com/showthread.php?t=53024)

nick_rasband@byu.net January 22nd, 2007 02:20 AM

ch11 "Using XML and Ajax" example doesn't work
I cannot get the "Use XML and Ajax" Try It Out example to work. I downloaded the code from the website and used his code, but it doesn't work. When I click on the link that is supposed to update the <div> tag with new XML content, nothing happens. I've looked through the code several times for errors and cannot see anything. I compared the code with the code in the book and could see no difference. I tried the example in Internet Explorer and FireFox, but to no avail. I even added a DTD and made the document XHTML compliant, and whereas the page is valid XHTML, it doesn't work. The link doesn't do anything. Any assistance would be greatly appreciated.

divnavoda March 27th, 2007 05:28 PM

Yep, i'm just going through the same, spent on it ... well good 2 hours. Not working.

divnavoda March 27th, 2007 06:13 PM

OK, I found it:

the request's method fetching the content of XML document is '.responseXML' not '.responseXml'.

So, the first line of the 'handleData' function is:

var xmlDocument = request.responseXML;

Now it works.

All times are GMT -4. The time now is 08:58 PM.

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