Capturing event.returnValue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • karthikpl83
    New Member
    • Feb 2008
    • 1

    Capturing event.returnValue

    Hi,

    Can anyone tell me how to capture event.returnVal ue.

    I have two actions written in my script which will be called during onbeforeunload event. Whenever onbeforeunload event is called, event.returnVal ue will be executed. This event.returnVal ue will hold a message with OK and CANCEL buttons. I want to submit a page based on the value returned from OK and CANCEL buttons.


    Your help will be much appreciated.

    Thanks,
    Karthik.
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Hi Karthik, welcome to TSDN!

    You don't need the returnValue. onbeforeunload fires before unload. If the user decides to cancel, they will stay on the page.

    Comment

    Working...