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

Closing a window 2

Status
Not open for further replies.

jimmythegeek

Programmer
May 26, 2000
770
US
I know this question had to have been asked before, but I can't find the answer in a search.

If I have a submit button that writes my record to a database, and then I want to close the window, how do I do that while still in VB Script running on the server?

Obviously window.close and self.close will not work as there is no "window" object running on the server.

This is driving me mad, and there has got to be an easy answer.

Thanks in advance. Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?
 
Just need to response.write() it out to the browser in javascript to get your effect:

if someCondition then
<%
<script language=javascript>window.close();</script>
%>
response.end
end if

put it right up in the head of your document, after your processing has finished, so that as soon as it's rendered to your client, their window just closes.

:)
paul
penny.gif
penny.gif
 
Paul,

I knew there had to be a simple answer. Thanks, worked perfect. Jim Lunde
compugeeks@hotmail.com
We all agree your theory is crazy, but is it crazy enough?
 
cheers buddy, ive been trying to suss this out for ages, oh so simple!

thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top