Forum Moderators: open

Message Too Old, No Replies

Close browser window without prompt

using VBscript

         

qwik

7:24 pm on Sep 16, 2005 (gmt 0)

10+ Year Member



I have a web page that processes and then sends off some information. That part works great. What I want to do is have the browser close itself most of the time when it is finished and returns a certain result. Also, without requiring confirmation to close. Im using vbscript on an asp page. This is what I was trying to make work:

<%
if xyz = "ok" then window.close()
%>

but, this doesnt work at all.. "window.close()" doesnt even work without the "if" statement.

if i use <script language "vbscript"> tags then the window.close() command works but then the variable xyz is empty..

any ideas?

-qwik

JAB Creations

5:10 am on Sep 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<a href="javascript:window.close();">Close This Window</a>

Dijkgraaf

11:35 am on Sep 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How about
<%
if xyz = "ok" then
%>
<script type="text/javascript">
window.opener="something";
window.close();
</script>
<%
end if
%>

qwik

5:23 am on Sep 21, 2005 (gmt 0)

10+ Year Member



Thanks guys, that works perfectly :)

-qwik