Click to See Complete Forum and Search --> : quick question


LAwebTek
02-13-2003, 10:23 PM
In the parent window document I have

<form name=form1>
<input type=hidden name=hf value=something>
</form>

can I reference this form from a script that opens in a popup window? If so, how? Also, if the popup is still open and the parent document is navigated to another page within my site and that page has

<form name=form1>
<input type=hidden name=hf value=somethingelse>
</form>

can I still access it from the same popup window?

LAwebTek
02-13-2003, 10:37 PM
there are no frames involved, so what's the hard way? :(

Also, the popup is giving me top.opener.document.form1.hf.value is null or not an object

LAwebTek
02-13-2003, 10:44 PM
I'm with you and yes, it is.

I noticed that if I define top.opener.form1.hf.value as a global variable I dont return the error but I do return undefined which is wierd because I defined the value in the form

LAwebTek
02-13-2003, 11:10 PM
ok that worked, by naming the window I can now retrieve the form value on page 1. Don't know why but it refused the top.opener reference. Havent tested to see if it will read page 2 yet, update in a few...

LAwebTek
02-13-2003, 11:18 PM
so why does it work when I do it using myPtr.document.form1.hf.value ? I didnt change anything else.

Anyway heres why I needed this - I wanted the popup to read the value in the form constantly until it changed. When page 2 loads it changes and kills the window. This much I have accomplished with your help. Now that I've done it the hard way (for the sake of learning) is there an easier way to popup a window and have the next page that loads kill it?

LAwebTek
02-13-2003, 11:28 PM
I need to start editing faster. ;)

btw - the other app that you helped me with is complete if you want to check it out visit http://javaamp.lawebtek.com