How to refer to FORM field from another window?
I have a main page with two frames. Both frames open when the page is loaded. The first frame is named "frame1" and contains a form "form1" with a text field. Both the name and ID of the field are set to "field1". The second frame is named "frame2" and contains a link that is supposed to change the value of the field in frame1.
I have been able to get a pointer to frame1 from frame2 by using top.document.getElementsByTagName("frame1"). I assume that getting a pointer to the form field is done by using document.getElementById("field1").
However, I have no clue on how to combine these two together and to reference the field from frame2? top.document.getElementsByTagName("frame1").document.getElementById("field1") is not working.
Any help is greatly appreciated!
Unless you have a custome tag called "frame1", I don't see how this would work at all. Are you sure this is what you are using, and it is not a typo in your post?
It would be appreciated if you would post a link to a web page, or post the actual code that creates the frameset and each of the pages referenced by the frameset.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)