Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New Coder
    Join Date
    Jul 2004
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    closing window with ASP

    How do I close a window using ASP? I know its some window.close or something like that. Any help would be greatly appreciated

  • #2
    Regular Coder
    Join Date
    Mar 2004
    Posts
    232
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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:
    Code:
    <SCRIPT type='text/javascript'>
    function closewin(){
         window.close();
    }
    </SCRIPT>
    Does that help?
    http://www.stophon4.com

  • #3
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    Quote Originally Posted by stophon4
    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.
    OracleGuy

  • #4
    New Coder
    Join Date
    Jul 2004
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I see so the code would be placed within the HTML page. Thanks for the help

  • #5
    New Coder
    Join Date
    Jul 2004
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #6
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    You could use Response.Redirect() after your done sending the email and send the user back to your homepage or whatever.
    OracleGuy

  • #7
    New Coder
    Join Date
    Jul 2004
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for all the help


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •