View Full Version : Interacting between 2 frames

12-05-2004, 01:22 PM
Hi all

I have an HTML document with 2 frames, Frame1 and Frame2.
In Frame1, I'm trying to build a script which should
1. retrieve and process the contents of Frame2
2. display some results in Frame1
3. set options in a form contained in Frame2 and submit it

Step 2 is of course no trouble, but I have a major problem with Step 1 and Step 3 : I
need to be able to retrieve/modify the contents of Frame2 from the script in Frame1. I tried using

parent.document.getElementById("Frame2").contentDocument but it does not seem
to work.

Any help will be appreciated.

12-05-2004, 08:52 PM
I think you could use that script if you were interacting with <iframe>īs, then you could give your iframe an 'id'. but I think youīre using normal frames; you usually donīt give a normal frame an 'id' or at least you donīt use its 'id' to call it. on your parent page you probably have:
<frameset cols="whatever...">
<frame src="..." name="Frame1">
<frame src="..." name="Frame2">
to call Frame2 you should use:


hope that works.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum