Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-13-2005, 12:27 AM   PM User | #1
dealmaker
Regular Coder

 
Join Date: Jul 2005
Posts: 342
Thanks: 0
Thanked 0 Times in 0 Posts
dealmaker has a little shameless behaviour in the past
Question Can Javascript Handle 2 Document nodes in Same Page?

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.
dealmaker is offline   Reply With Quote
Old 08-13-2005, 01:58 AM   PM User | #2
hemebond
Senior Coder

 
Join Date: Jul 2004
Location: New Zealand
Posts: 1,315
Thanks: 0
Thanked 2 Times in 2 Posts
hemebond is an unknown quantity at this point
Yes..
__________________
Forget style. Code to semantics. Seperate style from structure, and structure from behaviour.
I code to specs, and test only in Firefox (unless stated otherwise).
hemebond is offline   Reply With Quote
Old 08-13-2005, 02:04 AM   PM User | #3
dealmaker
Regular Coder

 
Join Date: Jul 2005
Posts: 342
Thanks: 0
Thanked 0 Times in 0 Posts
dealmaker has a little shameless behaviour in the past
Question

if so, how? use iframe? any better way?

Quote:
Originally Posted by hemebond
Yes..
dealmaker is offline   Reply With Quote
Old 08-13-2005, 02:27 AM   PM User | #4
hemebond
Senior Coder

 
Join Date: Jul 2004
Location: New Zealand
Posts: 1,315
Thanks: 0
Thanked 2 Times in 2 Posts
hemebond is an unknown quantity at this point
Using the xmlHttpRequest object.
__________________
Forget style. Code to semantics. Seperate style from structure, and structure from behaviour.
I code to specs, and test only in Firefox (unless stated otherwise).
hemebond is offline   Reply With Quote
Old 08-13-2005, 04:12 AM   PM User | #5
dealmaker
Regular Coder

 
Join Date: Jul 2005
Posts: 342
Thanks: 0
Thanked 0 Times in 0 Posts
dealmaker has a little shameless behaviour in the past
Question

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?

Quote:
Originally Posted by hemebond
Using the xmlHttpRequest object.

Last edited by dealmaker; 08-13-2005 at 04:31 AM..
dealmaker is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:17 AM.


Advertisement
Log in to turn off these ads.