Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- parsing ajax responseText into JS DOM


tortuga - 8:13 pm on Apr 30, 2007 (gmt 0)


Greetings,

This may be a very easy question, but for some reason I haven't been able to find the answer in the last hour or so of looking.

I'm a long-time web developer, but I'm brand new to Ajax. I'm working on a site that opens various forms in a floating Lightbox div. These forms are complete html pages, so non-js users just load it in their browser.

So, the Ajax request returns an html page. But, I need to modify that page/form based on which elements are present in the opening/parent page.

My question is, can I just pop the Ajax requestText into a standard JS DOM somehow, so I can use all the nifty methods for traversing the document tree, or do I have to parse the text directly? It seems like this should be easy to do, but I can't find the answer.

Thanks in advance.


Thread source:: http://www.webmasterworld.com/javascript/3326649.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com