Thursday, December 29, 2011

prompt aborted by user in Firefox 8/9

For few years, I had the following snippet of code that worked until Firefox 3.x. The following code refreshes the frame/page after the delete action to clear the old object and then alert the user that the action is complete.
refreshOnDelete();
alert(“Deleted Successfully");
In Firefox 8/9, looks like they are unloading cleanly. Therefore the alert will not be displayed to the user. Instead Firefox 8/9 displays an error message “prompt aborted by user”.
So, you should alert before refreshing the frame/page. The following code works in Firefox 8/9
alert(“Deleted Successfully");
refreshOnDelete();

No comments: