Close Window with submit

Results 1 to 2 of 2

Thread: Close Window with submit

  1. #1
    anne Guest

    Default Close Window with submit

    Hey<BR>I&#039m new ASP. I call new little window from my ASP page.<BR>I want to close this window and return whit submit to my ASP page in the first window.<BR>Need help<BR>Thanks<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Close Window with submit

    You need to cahnge the target of your form to the JavaScript name of the parent window, this is the window that opened the new popup window or any other window you want the form results to be sent to. To do this you first need to name the window :<BR><BR>&#060;script language="JavaScript"&#062;<BR> = "MainWindow"<BR>&#060;/script&#062;<BR><BR>Then in your form just change the target tag like this :<BR><BR>&#060;form action="whatever.asp" method=Post target="MainWindow" name="MyForm"&#062;<BR>...<BR>&#060;/form&#062;<BR><BR>In your opened window you need to have a button, within the form, which needs a onClick event added to it :<BR><BR>&#060;input tyep="button" onClick="document.MyForm.submit();window.close();" &#062;<BR><BR>That should do it.<BR><BR>Hope that helps<BR><BR>Pete

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts