Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

im trying to close a popup window after sending a form to email 1

Status
Not open for further replies.

debrac

IS-IT--Management
Jan 9, 2001
48
0
0
AU
why doesnt the following code work? im trying to close a popup window after sending a form to email.

<form name=&quot;form1&quot; method=&quot;post&quot; action=&quot;mailto:test@test.com&quot; onSubmit=&quot;window.close()&quot; enctype=&quot;text/plain&quot; >
 
read this one : thread216-40111
 
Hi, I had the same problem and found the solution just a
minute ago:
first, put the following function into the head-tag:
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
function closeWindow(){
window.close()
}
</SCRIPT>

Then, add the following to your submit-button
<INPUT TYPE=submit onClick=&quot;setTimeout(closeWindow, 5000)&quot;;
VALUE=&quot;send mail&quot;>
 
I tried it.. didn't work for me.. i can see that it will work though so no problems.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top