Advertisement
ASP_Volume2 Windows #39535

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

Yapay Zeka Özeti: 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.

Kaynak Kod
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>
Orijinal Yorumlar (3)
Wayback Machine'den kurtarıldı