开发者

IE prompt about unsaved form data

开发者 https://www.devze.com 2022-12-12 20:48 出处:网络
I\'m having an unexpected \"annoying\" popup in IE7 (and possibly other v开发者_Python百科ersions). As expected IE prompts you about unsaved form data when closing the window which is fine. But I have

I'm having an unexpected "annoying" popup in IE7 (and possibly other v开发者_Python百科ersions). 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?


Make sure that your doc type is transitional rather than strict


The prompt isn't IE's-- your HTML has an onbeforeunload handler which triggers the warning.

0

精彩评论

暂无评论...
验证码 换一张
取 消