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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

close popup window

Status
Not open for further replies.

bebig

Technical User
Oct 21, 2004
111
US
I want to close this popup window after 10 sec. automatically. Would you please tell me how to do??
and...even though this window page close, does the submit process still working??
Thank you in advance

---------code----------------------

puts "<form name=Form2 method=post>"
puts "<p><center><INPUT type=\"button\" value=\"Submit Schedule\" name=B3 style=\"font-family: Verdana; font-size: 11px\" onclick=\"return OnButton2();\"></center>\n"
puts "<p><center><font size=\"3\" face=\"Times New Roman, Times, serif\" color=\"#0066FF\"><b><i>After click \"Submit Schedule\", Please wait until you see \"Completed\" and then close window.</i></b></font></center></p>"
puts "</form>"
puts "</body>\n"
puts "</html>\n"
#----------------this part-----------------------------
puts "<script>"
puts "<!--"
puts "function OnButton2() {"
puts " document.Form2.action = \"newschedules.tcl\""
puts " document.Form2.submit();" ;# Submit
puts " return true;"
puts "}"
puts "//-->"
puts "</script>"
#---
 
Why in the world would you supply us with this code, when you could do a View > Source form your browser to make everything much more readable?

Put an onload event into your newschedules.tcl html, like this:

Code:
<body onload="setTimeout('window.close();', 10000)">

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
 
if I want to close after I click "submit schedule", how can I do?
thank you in advance.
 
Close the page you're currently on?

Code:
puts "function OnButton2() {"
puts "    document.Form2.action = \"newschedules.tcl\""
puts "    document.Form2.submit();"        ;# Submit
[blue]puts "    setTimeout('window.close()',10000);"[/blue]
puts "    return true;"
puts "}"

the 10000 means wait ten seconds, then close.

*cLFlaVA
----------------------------
[tt]tastes great, less filling.[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top