Guest_imported
New member
- Jan 1, 1970
- 0
Hello -
Is it possible to pass values from an input form in a pop-up window back to a form in the parent window with javascript? - I've been playing around all day - but if someone could point me to some sample code, I'd be greatly appreciative. Basically the below outlines it -
<form action="cgi.cgi">
<tr><td align=center WIDTH="200" BGCOLOR="#F8F1F1">Individual Vendor ID Number (add '1' to previous)</a></td>
<td><input type=text name="vendor_number" size=25></td></tr>
<script language="JavaScript">
function surfto(form) {
var myindex=form.select1.selectedIndex
if (form.select1.options[myindex].value != "0"
{
location=form.select1.options[myindex].value;}
}
//-->
</SCRIPT>
<script language=javascript
type="text/javascript">
function newWindow(open) {
mailWindow = window.open(open,'mailWin','width=300,height=300,toolbar=no,resize=yes,scrollbars=yes location=yes')
mailWindow.focus()
}
</script>
<SELECT NAME="select1" onChange="surfto(this.form)" SIZE=1>
<OPTION SELECTED VALUE="0">Does the vendor offer any special items?
<option value="javascript:newWindow(' <option value="">No
</SELECT>
<tr><td align=center WIDTH="200" BGCOLOR="#F8F1F1">Phone Number</a></td>
<td><input type=text name="phone" size=25></td></tr>
<tr><td align=center WIDTH="200" BGCOLOR="#F8F1F1">Contact Email Address</a></td>
<td><input type=text name="email" size=25></td></tr>
<input type="submit" value="Enter item in database">
From the drop down, a window pops-up if the person selects "yes" - for the person to fill out an additional form of input options, if and only if they pick 'yes' from the drop-down menu.
So - my question is, once they fill out the form on the pop-up window, can someone tell me how to get those input entries back into the original form so they will be processed with other entry items?
Thanks so much!
Nathan
Is it possible to pass values from an input form in a pop-up window back to a form in the parent window with javascript? - I've been playing around all day - but if someone could point me to some sample code, I'd be greatly appreciative. Basically the below outlines it -
<form action="cgi.cgi">
<tr><td align=center WIDTH="200" BGCOLOR="#F8F1F1">Individual Vendor ID Number (add '1' to previous)</a></td>
<td><input type=text name="vendor_number" size=25></td></tr>
<script language="JavaScript">
function surfto(form) {
var myindex=form.select1.selectedIndex
if (form.select1.options[myindex].value != "0"
location=form.select1.options[myindex].value;}
}
//-->
</SCRIPT>
<script language=javascript
type="text/javascript">
function newWindow(open) {
mailWindow = window.open(open,'mailWin','width=300,height=300,toolbar=no,resize=yes,scrollbars=yes location=yes')
mailWindow.focus()
}
</script>
<SELECT NAME="select1" onChange="surfto(this.form)" SIZE=1>
<OPTION SELECTED VALUE="0">Does the vendor offer any special items?
<option value="javascript:newWindow(' <option value="">No
</SELECT>
<tr><td align=center WIDTH="200" BGCOLOR="#F8F1F1">Phone Number</a></td>
<td><input type=text name="phone" size=25></td></tr>
<tr><td align=center WIDTH="200" BGCOLOR="#F8F1F1">Contact Email Address</a></td>
<td><input type=text name="email" size=25></td></tr>
<input type="submit" value="Enter item in database">
From the drop down, a window pops-up if the person selects "yes" - for the person to fill out an additional form of input options, if and only if they pick 'yes' from the drop-down menu.
So - my question is, once they fill out the form on the pop-up window, can someone tell me how to get those input entries back into the original form so they will be processed with other entry items?
Thanks so much!
Nathan