locked
Update sql database on onbeforeunload RRS feed

  • Question

  • User-308135108 posted

    Hi Guys,

    i have a page where a user enters a lot of information and what i would like to do is automatically update whatever they've entered into the a sql database whenever they navigate away from the page or close the browser.

    i tried using sqlMyDataSource.Update() on page.Unload, and sqlMyDataSource.Update() in window.onbeforeunload in javascript but both didnt work.

    Not sure what else i can do. Can i please get some help with this?

    Thanks

    Adkar

    Tuesday, July 19, 2011 10:03 AM

Answers

  • User2128666432 posted

    My assumption is that they placing all this information into a form. After they are down have them submit and then send them away from the page. Thats my logical guess at least, i could be worse. If they fill the page half way and decide to stop and go else where wouldnt it be a problem updating the DB with only half a page of data?? Let me know if i'm wrong with my assumption

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 20, 2011 4:50 PM

All replies

  • User2128666432 posted

    My assumption is that they placing all this information into a form. After they are down have them submit and then send them away from the page. Thats my logical guess at least, i could be worse. If they fill the page half way and decide to stop and go else where wouldnt it be a problem updating the DB with only half a page of data?? Let me know if i'm wrong with my assumption

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 20, 2011 4:50 PM
  • User3866881 posted

    Hello OP:)

    In my mind, I think you can handle onbeforeunload and with the help of AJAX in jQuery+WebService(where there should be an existing updating method) to deal with that.

    Wednesday, July 20, 2011 10:25 PM