Advertisement
C_Volume2 Windows #80597

Form in popup targets parent

popup window how can I submit a form, close the popup window and target the results of the form into the main window? Found at: http://www.irt.org

AI

AI 요약: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

소스 코드
original-source
Use a timer to close the window, and add a TARGET to the form: 
<FORM ACTION="apage.html" TARGET="mywindowname" onSubmit="setTimeout('window.close',2000)">
<INPUT TYPE="SUBMIT">
</FORM>
 

Now make sure that in the main window you set its name (by default the main window has no name): 
<SCRIPT LANGUAGE="JavaScript"><!--
window.name="mywindowname"; // will not work in NN2 as name is read only
//--></SCRIPT>
원본 댓글 (3)
Wayback Machine에서 복구됨