window.close() No ONCLICK ?

J

Jay Swan

I am trying to get a redirector page to redirect or close
based on a querystring.

The redirect part is easy, and is working fine...

I now need to figure out a way to close the page as well.
I can not use <a ONCLICK="window.close()"> with a button
because the page has to close by it's self based on the
value of the querystring.

Here is what I have, any ideas on how I can close the
window based on the querystring ?

<html>
<%Language=VBScript%>
<%
GoToURL = Request.querystring("site")
parmAction = Request.querystring("action")
%>

<head>
</head>
<body>

parmAction : <% Response.Write parmAction %></br>

<% if parmAction <> "Close" Then %></br>
Waiting 10 Seconds For Testing ReDirect</br>
<meta HTTP-EQUIV="REFRESH" content='10; url=http://<%
Response.Write GoToURL%>'>
<%else%>
</br>
*****************************</br>
<%Response.Write parmAction%> Window Selected</br>
Write Code To Close Window</br>
*****************************</br>

<%end if%>
</body>
</html>
 
M

Murray

<%Response.Write parmAction%> Window Selected</br>
<script type="text/javascript">self.close()</script></br>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top