I try to use a button to open a small window, and the small window allows
user to insert , change data, which will change the data in the opener too.
As the small window requires some access to database(mysql), it takes time
and it seems the form in the small window is not created before any
assignment of the form's element:

Line 1: winPro = window.open("xxx.php",...);
Line 2: winPro.document.forms[0].h_code.value = sth;

It barks me that winPro.document.forms[0].h_code doesn't exist.. well, then
I alert and show the h_code's value, which is shown as undefined.
so i try to insert a while loop between Line 1 and 2:
while (winPro.document.forms[0] == null && winPro.document.forms[0].h_code
== null ){}

the code above works. It seems like the window is created but the form
isn't, and then the value is assigned.

any one has such experience? could anyone help to solve this problem?(it
looks too bad to do some no use loop..)

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to