...

View Full Version : Can Javascript Handle 2 Document nodes in Same Page?



dealmaker
08-13-2005, 01:27 AM
Hi,
I have a web home page acts kind of like a Table of content/index for the rest of the pages in the website. I need to use javascript to get elements/nodes from different pages. It means that I need more than one document node.

So is it possible to have more than 1 document nodes in one single page? If so, how can I do it?

Many thanks.

hemebond
08-13-2005, 02:58 AM
Yes..

dealmaker
08-13-2005, 03:04 AM
if so, how? use iframe? any better way?


Yes..

hemebond
08-13-2005, 03:27 AM
Using the xmlHttpRequest object.

dealmaker
08-13-2005, 05:12 AM
But how do I get the elements in php? If I use xmlhttprequest, it means that I have to use php to read my other pages and retrieve the elements. Is there functions in php to do that?

Also, if I use iframe, I assign the url of my sub page into the iframe's src, then traverse the iframe's page. But the problem seems that the page isn't loaded yet and there is no document object of the iframe. So I can't traverse anything. How to get around that?


Using the xmlHttpRequest object.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum