Problem writing data to a form in another window

A

Alan Hewat

I open a new "myDoc" window with "myPage.html" containing "myForm" and
want to fill in the values of "myField" with some PHP variable
"$myVar". The following script:

1) works with MSIE-6, but only if I insert the alert (to give the
window time to load ? Is this really necessary ?)

2) with Mozilla-1.4 myPage.html opens but myField is not filled in.
Why not ?

myDoc=window.open('myPage.html','myDoc','width=620,height=600,left=10,top=10');
alert('Close this alert box to enter document details');
myDoc.focus();
myDoc.myForm.myField.value='$myVar';

Suggestions welcome. (I am not a javascript expert).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,575
Members
47,207
Latest member
HelenaCani

Latest Threads

Top