1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    34
    Vote Rating
    0
    sravaniv is on a distinguished road

      0  

    Default Unanswered: window.onbeforeunload should be fired only in some scenarios

    Unanswered: window.onbeforeunload should be fired only in some scenarios


    Hi guys,

    I have the following scenario:

    I have a page and an edit button after clicking of which the same page opens in a separate window for the user to edit.

    The user should be prompted before he navigates away only from the edit mode of that page.It is 'Are you sure you want to navigate blah blah blah..?" the usual message.This message is not required when the user tries to navigate from any other page of the application.Though I have tried to constrain the firing of the event using an 'if' condition to check if the user is in that page or not , it doesn't work.I get the message every time I try to close a window or navigate away from any page of the application.

    Do you think onbeforeunload is the proper event to be handled in this scenario?

    Please help!

    Thanks,
    Sravani

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,010
    Answers
    668
    Vote Rating
    460
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

Thread Participants: 1