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

window.close()...NOT

Status
Not open for further replies.

cabobound

Programmer
Jul 11, 2007
80
US
I am trying to automate a process where the browser opens, runs a script then closes. I am using a system scheduler to open, asp scripting and a footer to close. The window opens, the script executes and gets to the js but the window will not close. I am using firefox where this has not been an issue.

The code can be run manually or automated. I even had an alert box which executed. Any ideas on why this script will not close the window?

Thanks in advance....k

<%If Request("ss")="t" Then%>
<script language=javascript>
window.close();
</script>
<%Else%>
<script language=javascript>alert("Processing Complete");</script>
<%End If%>
 
Ok, the error console is telling me "Scripts may not close windows that were not opened by script."

How do I fix this and make it close?!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top