
Question:
I'm having an unexpected "annoying" popup in IE7 (and possibly other versions). As expected IE prompts you about unsaved form data when closing the window which is fine. But I have a form
inside a div
and now when I toggle the display
CSS style between none
and block
, IE thinks I'm closing the form with unsaved data and shows the warning about closing an unsaved form! I don't want my users to be annoyed when simply hiding a form in my IE-based web app.
Anyone know how to overcome this?
Solution:1
Make sure that your doc type is transitional rather than strict
Solution:2
The prompt isn't IE's-- your HTML has an onbeforeunload handler which triggers the warning.
Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
EmoticonEmoticon