Java script windo handling

Hi All
how should i get the value of text from the child window (Created form main form ) to the textbox of the main window (Parent window.)
Manish Bhushan
[173 byte] By [manishbhushan] at [2007-11-19 11:05:09]
# 1 Re: Java script windo handling
If you are doing this from the main window:<script type="text/javascript">

// alerts the value of text box from a child window.
alert(window.child_name.form_name.field_name.value);
// puts value of child text box into main text box.
document.main_form_name.main_field_name.value = window.child_name.document.form_name.field_name.value;

</script>At least I think ^^. From the child window:<script type="text/javascript">

// puts value of child text box into main text box.
window.opener.document.main_form_name.main_field_name.value = document.form_name.field_name.value;

</script>Both script do the intention, get the child text box, and store its value in the main text field. The first code would be if it runs i nthe main window, the second, if the code is in the child window.

Dr. Script
Dr. Script at 2007-11-8 0:21:15 >