Advertisement
Java_Volume1 Windows #99141

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

Podsumowanie 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.

Kod źródłowy
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>
Oryginalne komentarze (3)
Odzyskane z Wayback Machine