Welcome to WebmasterWorld Guest from 54.196.26.1

Forum Moderators: open

Message Too Old, No Replies

Close browser window without prompt

using VBscript

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

Junior Member

10+ Year Member

joined:Dec 25, 2004
posts:56
votes: 0


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

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

Senior Member from US 

WebmasterWorld Senior Member jab_creations is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 26, 2004
posts:3178
votes: 22


<a href="javascript:window.close();">Close This Window</a>
11:35 am on Sept 17, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 31, 2005
posts:1108
votes: 0


How about
<%
if xyz = "ok" then
%>
<script type="text/javascript">
window.opener="something";
window.close();
</script>
<%
end if
%>
5:23 am on Sept 21, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 25, 2004
posts:56
votes: 0


Thanks guys, that works perfectly :)

-qwik

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members