1

i need to create a pop up message on one of our visualforce pages which when the user tries to leave the page or exit the browser when data has been inputted into the inputfields and hasnt pressed the save button,

i only need the pop up to appear in those 2 instances and not really sure where to start with this, anyone can point me in the right direction would be very handy

thanks

0

1 Answer 1

1

Well you would have to set some sort of flag if a field has been populated and not saved. After that you can always run something like this to get your dialog box

window.onbeforeunload = function() {
  return "Are you sure you want to leave this page?";
}

Not the answer you're looking for? Browse other questions tagged .