window.onbeforeunload conflicting with Portal Calendar Date Picker - Forum - Rollbase - Progress Community

window.onbeforeunload conflicting with Portal Calendar Date Picker

 Forum

window.onbeforeunload conflicting with Portal Calendar Date Picker

  • In our portals, we have implemented a javascript function that uses the window.onbeforeunload event to alert the user if they try to navigate away from a page without saving their changes. It seems that, in Internet Explorer only, this event gets triggered when a user selects a day in the popup minicalender date picker used with date fields in portals. Do you have any ideas as to what function in your calendar date picker feature might be triggering window.onbeforeunload in internet explorer?
  • Could it be that the calendar popup is loaded in an iframe, so when it's closed IE considers it closing a window?
  • Hi Ben,



    Sorry I'm not familiar with this event type, I did some quick Google searching and it sounds like others have had issues with this particular event in IE8 when page content is dynamically changed [which happens when calendar is opened]. I'm not sure what the resolution would be, FYI the calendar popup does not use an iframe.



    Regards,

    Matt
  • Crazy IE. There must be a way to differentiate the events in your handler.