how to open page when one exits

Results 1 to 2 of 2

Thread: how to open page when one exits

  1. #1
    Join Date
    Dec 1969
    Posts
    56

    Default how to open page when one exits

    how do you have an asp page open when one exits using the little x on the browser, or have an asp page run when someone crashes out of the page by either lost connection or power outage?<BR><BR>for example....I have a page that holds information, when someone exits or crashes, I need this info to be written to the database.....can this be done?<BR><BR>Please Help?

  2. #2
    Simhan Guest

    Default RE: how to open page when one exits

    You have options<BR><BR>1) Use the Session_OnEnd sub-procedure of global.asa. The event fires whenever the user session ends. Write your coding to save any contents to the database. Remember, you cannot have any printable statements in this file, neither can you use the &#060;% delimiters. Use the SCRIPT tag.<BR><BR>2) To open a new window when the user exits, try using JavaScript.<BR>&#060;head&#062;<BR>&#060;script Language="JavaScript"&#062;<BR>function newWindow()<BR>{<BR>window.open("somefile.asp")<BR >}<BR>&#060;/script&#062;<BR>&#060;/head&#062;<BR>&#060;body onUnload="newWindow()"&#062;<BR><BR>pls let me know the feedback to cnsimhan@yahoo.com<BR>

Posting Permissions

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