Quote:
|
quote:>the first window will retrieve the input from the second form without lossing the current value.
|
What value?
This should work in all browsers except NN 2 and before:
Code:
opener.document.forms["userData"].age.value = document.forms["entry"].userAge.value;
What happens?
All browsers assign an opener property to a window created via the window.open() method. In my example the <form> in the second window is userData, with the text field age and the first <form> is entry with the text field userAge. This script should reside in the subwindow. The opener property is not assign if opened by the user (then it's NULL). You can check for that by using this code snippet:
Code:
if (typeof window.opener == "object"){
// current subwindow opened by script
}
Happy programming (like their say on 4guysfromrolla). :)
- mega