PopUp on Browser close only in InfoPath Forms - InfoPath Dev
in

InfoPath Dev

PopUp on Browser close only in InfoPath Forms

Last post 07-18-2012 07:51 PM by Anson Hidajat. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 07-18-2012 07:00 PM

    PopUp on Browser close only in InfoPath Forms

    Hi,

     

    I am using SP 2010 with infoPath 2010.

     

    In order to prevent data loss if users of the form close the browser window, we would like to display that prompts the user to save data before closing? It would be something like “Are you sure you want to close the browser?” with <Yes> to continue closing and <No> to cancel the close and return to the application.

     

    I have managed to include a popup on the Forms but this popup comes up every time a user navigates away from a page (this includes button clicks, tab changes etc). Of course, this is not required as all we want is the popup to appear when the user closes the browser window.

     

    As InfoPath forms generates the form at runtime using JavaScript and there are events attached dynamically on every user action (including button clicks), I have not been able to attach an event that will separate the clicks on the Buttons from the window close. 
    Please suggest. 

    Regards,

    Amit

  • 07-18-2012 07:51 PM In reply to

    Re: PopUp on Browser close only in InfoPath Forms

    I think it will be fairly difficult to isolate the browser close event and display a prompt for the user to save. At least I've never heard of someone being able to do this. The client will prompt on an application close but of course that would mean using the client instead. Sorry couldn't be more help.
    Anson Hidajat
    Qdabra® Software/ InfoPathDev.com
    The InfoPath Experts – Streamline data gathering to turn process into knowledge.™

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.