execute an asp code on unload

Results 1 to 2 of 2

Thread: execute an asp code on unload

  1. #1
    Join Date
    Dec 1969

    Default execute an asp code on unload

    i want to execute a databasequery onunloading window and after confirm message.unload==&#062;confirm message==&#062;execute query<BR>how can i do it.

  2. #2
    Join Date
    Dec 1969

    Default Generally, cannot be done

    You can only execute that query by forcing the user to *your* ASP page. Thus effectively ignoring their requested page.<BR><BR>That is, if the user types in or otherwise selects the URL of some completely unrelated site and you then try to take control with the onUnload event, you will not know where they are trying to go to. So if you then "trapped" them to your "close out" page, they&#039d get pretty annoyed that you didn&#039t allow them to go where they wanted to.<BR><BR>What you *might* do (I&#039ve never tried it, but it might work) would be to cause the onUnload to popup a new window and direct that new window to your ASP page that does the "close-out" code (and query). The window could even auto-close when it had done its job. By doing it this way, you don&#039t interfere with the user&#039s movement to the next page of her/his choice.<BR><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