...

View Full Version : closing window with ASP



npala2001
07-15-2004, 05:30 PM
How do I close a window using ASP? I know its some window.close or something like that. Any help would be greatly appreciated

stophon4
07-15-2004, 05:44 PM
Asp, being a server side language, I dont think you could do that (correct me if I'm wrong).

But here is some javascript codes that does that:


<SCRIPT type='text/javascript'>
function closewin(){
window.close();
}
</SCRIPT>


Does that help?

oracleguy
07-15-2004, 06:01 PM
Asp, being a server side language, I dont think you could do that (correct me if I'm wrong).

You are correct, ASP executes on the server and is done before the page is sent to the user. So obviously, there can't be any interaction with the user's browser.

npala2001
07-15-2004, 06:16 PM
I see so the code would be placed within the HTML page. Thanks for the help

npala2001
07-15-2004, 06:23 PM
One more question:

I have my HTML page (A Form) it calls the ASP page to email the information to me. How can I close the ASP page that it called. Because once the form is completed the user is left with a blank page in front of them (ASP Page)

Thanks

oracleguy
07-15-2004, 06:29 PM
You could use Response.Redirect() after your done sending the email and send the user back to your homepage or whatever.

npala2001
07-15-2004, 07:02 PM
Thanks for all the help



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum