View Full Version : How To Use AJAX To Load My Sub-pages?

08-13-2005, 07:13 PM
I am doing some kind of table of content/indexing on my website. Once the visiter chooses one of the sub-pages in my website, it will traverse of this sub-page and load some of the elements in that sub-page. But it all happens without loading a totally new page.

I am trying to do it in AJAX. AJAX can return either responseText or responseXML. But I can't use responseXML because it's for xml and my pages are in html. I can't use responseText neither because I want to traverse the dom tree in those sub-page.

So how do I do it?

Many thanks.

08-15-2005, 09:01 PM
You have to make a choice - either the data returned is XML, so that you can traverse the DOM, or it's not, in which case you'll have to do a bunch of text processing operations.