Reply
Closing a window and returning to the window that opened it
Old 07-31-2006, 12:43 PM Closing a window and returning to the window that opened it
wacara's Avatar
Novice Talker

Posts: 14
Name: Wanda
Location: Belvidere, IL
I have a form with a radio button that when selected will open another form (in another window). The user will enter data on this form also, which will be entered into a DB.

What I need to happen is when the submit button is hit, the data is submitted and the window closes going back to the original form that can be completed and submitted, but what actually happens is that the data is submitted and a new version of the window that originally opened it [which is blank] and does not close.

I've tried using window.close and self.close but did not get the desired results. Is there any javascript code that I can use to achieve the desired results?

Here's the html code for the form

HTML Code:
<body>
<div align="center"><STRONG>QUOTE REQUEST<BR>
<font size="+1"><EM>ELECTRONICS INFORMATION</EM></font></STRONG></div>
<P>&nbsp;</P>
<FORM action="QReqElecInfo.asp" method="post" name="QRequest4a" id="QRequest4a">
<table>
<tr>
<input name="Origin" type="hidden" id="Origin" value="true">
<td width="125"><strong>TRANSDUCER :</strong> 
                                    
<td width="395"><input type="radio" name="transducer" value="Analog" onmouseup="changeSet(this);"> Analog
<input type="radio" name="transducer" value="Digital" onmouseup="changeSet(this);">Digital</td>
</tr>
</table>
<p></p>
<table width="863">
<tr>
<td width="141" valign="bottom"><strong>ANALOG OUTPUT <br> SIGNAL TYPE :  &nbsp;&nbsp;</strong></TD>
<TD width="313" valign="bottom"><SELECT Name="AnaOut" disabled='disabled'>
                        <option value="Choose Type">Choose Output Type</option>
                        <option value="0 to +10 VDC">0 to +10 VDC</option>
                        <option value="+10 to 0 VDC">+10 to 0 VDC</option>
                        <option value="-10 to +10 VDC">-10 to +10 VDC</option>
                        <option value="+10 to -10 VDC">+10 to -10 VDC</option>
                        <option value="4 to 20 MA">4 to 20 MA</option>
                        <option value="20 TO 4 MA">20 TO 4 MA</option>
                        <option value="0 to 20 MA">0 to 20 MA</option>
                        <option value="20 to 0 MA">20 to 0 MA</option>
                        <option value="OTHER">OTHER</option>
                        </select></td>
                        
<td width="134"><strong>DIGITAL OUTPUT <br> SIGNAL TYPE :  &nbsp;&nbsp;</strong></td>
<td width="255">        <SELECT Name="DigOut" id="DigOut" disabled='disabled' onChange="changeSet(this);">
                        <option value="Choose Type">CHOOSE OUTPUT TYPE</option>
                        <option value="PWM">PWM</option>
                        <option value="SSI">SSI</option>
                        <option value="CAN_BUS">CAN BUS</option>
                        <option value="START/STOP">START/STOP</option>
                        </select></td>
</tr>
</table>
<p></p>
<table width="806">
<tr>
<td width="143" valign="bottom"><strong>INTERROGATION:</strong></td>
<td width="313" valign="bottom">
                          <SELECT Name="interrogation" disabled='disabled'>
                        <option value="Select One">Select One</option>
                        <option value="PULSE DURATION - INTERNAL INTERROGATION">PULSE DURATION - INTERNAL INTERROGATION</option>
                        <option value="PULSE DURATION - EXTERNAL INTERROGATION">PULSE DURATION - EXTERNAL INTERROGATION</option>
                        <option value="START/STOP PULSE">START/STOP PULSE</option>
                        </select></td>
<td width="161" valign="bottom"><strong>RECIRCULATIONS:</strong></td>
<td width="576" valign="bottom"><INPUT Name="recirc" type="text" size="25" maxlength="25" disabled='disabled'>
</tr>
<TR>
</table>
<p></p>
<table>
<td width="161" valign="bottom"><strong>DATA LENGTH:</strong></td>
<td width="161" valign="bottom"><strong>Format:</strong></td>
<td width="576" valign="bottom"><INPUT Name="format" type="text" size="25" maxlength="25" disabled='disabled'></td>
<td width="161" valign="bottom"><strong>Resolution:</strong></td>
<td width="576" valign="bottom"><INPUT Name="resolution" type="text" size="25" maxlength="25" disabled='disabled'></td>
<td width="161" valign="bottom"><strong>Performance:</strong></td>
<td width="576" valign="bottom"><INPUT Name="performance" type="text" size="25" maxlength="25" disabled='disabled'></td>
<td width="161" valign="bottom"><strong>Options:</strong></td>
<td width="576" valign="bottom"><INPUT Name="opts" type="text" size="25" maxlength="25" disabled='disabled'></td>
</TR>
</table>
<p></p>
<table>
<tr>
<td width="95" valign="bottom"><strong>PROTOCOL:</strong></td>
<td width="175" valign="bottom">
                          <SELECT Name="protocol" disabled='disabled'>
                        <option value="Select One">Select One</option>
                        <option value="device_net">DEVICE NET</option>
                        <option value="can_basic">CAN BASIC</option>
                        <option value="can_open">CAN OPEN</option>
                        </select></td>
<td width="75" valign="bottom"><strong>Baud Rate: </strong></td>
<td width="175"><input name="baud_rate" type="text" size="10" disabled='disabled'></td>
<td width="75" valign="bottom"><strong>Resolution</strong></td>
<td width="175"><input name="baud_res" type="text" size="25" disabled='disabled'></td>

</tr>
</table>
<P></P>
<P></P>
<P></P>
<table height="31">
  <TR><td>**********************************************************************************</td></TR></table>
<p></p>
<p></p>
<p></p>
<table>
<tr>
<td width="104"><strong>SWITCHES:</strong></td>
<td width="225"><input name="switches" type="radio" value="AC" onmouseup="changeSet(this);">AC
                  <input name="switches" type="radio" value="DC" onmouseup="changeSet(this);">DC</td>

</tr>
</table>
<p></p>
<table width="1034">
<tr>
<td width="79" valign="bottom">SWITCH <BR> LOCATION</td>
<td width="120"><input name="SwitchLoc" type="text" size="20" maxlength="20" disabled='disabled'></td>
<td width="103" valign="bottom">CONNECTOR <BR> ORIENTATION</td>
<td width="184"><input name="connector" type="text" size="20" maxlength="20" disabled='disabled'></td>
<td width="524"><input name="electron" type="radio" value="PNP" disabled='disabled'>PNP 
                <input name="electron" type="radio" value="NPN" disabled='disabled'>NPN</td>
</tr>
</table>
<p>&nbsp;</p>

<p></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div align="center">
<input type="submit" name="button" value="Submit"  onBlur="window.close();">
<input type="reset" name="Reset" value="Clear">
</div>
</form>
<p>&nbsp;</p>

  
<Form action="QReqElecInfo.asp" method="post" name="QRequest4b" id="QRequest4b">
<input name="transducer" type="hidden" size="5" value="<%=Request.Form("transducer")%>">
<input name="transducer" type="hidden" size="5" value="<%=Request.Form("transducer")%>">
<input name="AnaOut" type="hidden" size="20" value="<%=Request.Form("AnaOut")%>">
<input name="DigOut" type="hidden" size="20" value="<%=Request.Form("DigOut")%>">
<input name="interrogation" type="hidden"  value="<%=Request.Form("interrogation")%>">
<input name="recirc" type="hidden"  value="<%=Request.Form("recirc")%>">
<input name="format" type="hidden"  value="<%=Request.Form("format")%>">
<input name="resolution" type="hidden" size="50" value="<%=Request.Form("resolution")%>">
<input name="performance" type="hidden" value="<%=Request.Form("performance")%>">
<input name="opts" type="hidden" value="<%=Request.Form("opts")%>">
<input name="protocol" type="hidden" size="50" value="<%=Request.Form("protocol")%>">
<input name="baud_rate" type="hidden" size="5" value="<%=Request.Form("baud_rate")%>"> 
<input name="baud_res" type="hidden" size="5" value="<%=Request.Form("baud_res")%>"> 
<input name="switches"type="hidden" value="<%=Request.Form("switches")%>">
<input name="switches" type="hidden" value="<%=Request.Form("switches")%>">
<input name="SwitchLoc" type="hidden" value="<%=Request.Form("SwitchLoc")%>">
<input name="SwitchLoc" type="hidden" value="<%=Request.Form("connector")%>">
<input name="electron" type="hidden" size="5" value="<%=Request.Form("electron")%>"> 
<input name="electron" type="hidden" size="5" value="<%=Request.Form("electron")%>"> 

</form>
</body>
</html>
__________________
you gotta see it before you see it or you never will see it...
wacara is offline
Reply With Quote
View Public Profile Visit wacara's homepage!
 
When You Register, These Ads Go Away!
     
Old 07-31-2006, 08:17 PM Re: Closing a window and returning to the window that opened it
funkdaddu's Avatar
Web Design Snob

Posts: 636
Run this from the pop-up window:
Code:
window.opener.focus();
window.close();

Last edited by funkdaddu : 07-31-2006 at 10:12 PM.
funkdaddu is offline
Reply With Quote
View Public Profile Visit funkdaddu's homepage!
 
Reply     « Reply to Closing a window and returning to the window that opened it
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.12317 seconds with 13 queries