Results 1 to 3 of 3

Thread: On_sessionEnd

  1. #1
    Join Date
    Dec 1969

    Default On_sessionEnd

    I am trying to write some ASPs that allow various users to respond to posted questions. I do not want a user to be able to reply to a question while another user is replying (only one response allowed per question), so in my database of questions, I have a "locked" field. Before I allow the reply, I check to see if it&#039s locked (currently open by another user). I lock it during the reply, and unlock it afterwards.<BR><BR>Here&#039s my problem: what if the user hits the back button, closes the browser, or otherwise exits the page abnormally while replying? The database will still say the question is locked. <BR><BR><BR>I have on_sessionEnd function where I unlock the Database by delete from database. But the problem is it does not unlock right away, It waits till the session timesout. Is there a way to detect if the browser is closing,or user has moved to another <BR>domain.<BR><BR>Any help or Idea will be appreciated. Thanx in Advance

  2. #2
    BalletChick Guest

    Default RE: On_sessionEnd

    The strict answer to your question is no... you cannot &#039sense&#039 when a user has left your site.<BR><BR><BR>If you want to limit the number of answers to one, wouldn&#039t it be much simpler to just make it a first come-first saved basis? In other words, the first person to post the finished answer gets to be &#039the one&#039 that is saved to the database, while all others that arrive afterward are rejected?<BR><BR>Just curious. :)

  3. #3
    Join Date
    Dec 1969
    Los Angeles, CA


    stick to one forum and be patient

Posting Permissions

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