Important: For the new 2nd edition of this book, please post here instead: [url="http://p2p.wrox.com/forum.asp?FORUM_ID=307"]http://p2p.wrox.com/forum.asp?FORUM_ID=307[/url]
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Professional Ajax ISBN: 978-0-471-77778-6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
hello everyone
i was creating an ajax based file manager for managing remote files.
at home i have installed apache and php on windows and test my php scripts there
it is working fine on my pc at home
but when i uploaded to my hosting space it is causing some errors
to check the error i have put an alert statement:
Code:
var oXmlDom = zXmlDom.createDocument();
oXmlDom.loadXml(sResponseText);
alert(oXmlDom.childNodes[1]); // alerting 'null'
In that case, I'm not sure what the problem may be. Are you sure that sResponseText actually returns something on your server? Perhaps you're missing the XML file you're trying to load?
Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088) http://www.nczonline.net/
actually xml is echoed by php
the script reads the directory and prints the xml
it is really strange that it is not working
i'm loading the page with the same browser and version
ok, when i find out the problem i'll let you know if you want
yes
the response text was valid xml
as i've posted in the first post
finally i've decided to get the response text and parse through it
instead of using xmldom
If I may ask, why are you using the childNodes list to test the document? In all of my tests oXmlDom.childNodes[1] returns undefined. Did you try oXmlDom.documentElement (both at home and on your live server)?
Lastly, is there a URL we can look at. It's one thing to be told how it is; it's another to see it. I know you're parsing it now, but using the DOM's much easier ;)