1 Reply Latest reply on Sep 29, 2011 4:18 PM by ArtashesGamarian

    Prompt to save markups when existing AutoVue


      I am trying to add "Prompt to save markups" when exiting AutoVue by closing a Web Browser window.
      I am having trouble with "Cancel" button as its not behaving as expected.

      When I close the browser window with modified markups I get a prompt with three options :

      a) Yes -- Allows to save and exit . Behaves as expected . All good.
      b) No -- Ignore changes and exits . As expected . All good.
      c) Cancel -- Ignore changes and exits. Behaves exactly as "No" option. I expected it to return to applet and DO NOTHING . Instead it closes the window.

      Below is the code I am using to activate this feature .
      function onClose()
      <body onLoad="onBodyLoad()" onBeforeUnload="onClose()">
      Am I doing something wrong or Is that the expected behaviour of "Cancel" or Is it a bug ?


      Edited by: MarkAconex on Sep 21, 2011 11:29 PM
        • 1. Re: Prompt to save markups when existing AutoVue
          Hi Rizwan & Mark,

          Sorry for a late reply, trouble with notifications...

          The problem here is that the script is called from the web page just before closing it and applet doesn't have an option to stop page from closing anyway, that's why 'cancel' option is not correct in this context.

          saveModifiedMarkups() method has 2 variations, you need to call the one that takes 'mayCancel' parameter and set it to false.
          In that case the prompt will only have two options: 'yes' and 'no'.
          So your function will look like this:
          function onClose()


          Please let me know if you have any farther questions related to this...