开发者

Why would IE7 ask my approval( the user) when there is a window.prompt?

I have in my code a window.prompt, which shou开发者_高级运维ld stop the flow of the code until user put in some value.

Of course IE7 try to protect me from myself and instead of showing the prompt it shows the security tab (top of the page where it alerts to the users that a script wants to open a window).

What is even worse is that the prompt is ignore and the rest of the flow is being done. Regardless to say this can't work as the script is missing data from the user.

What should I do to avoid that security bar, as this script is part of the page/domain.


window.prompt() is no longer usable on the general web for this very reason, since there's no way to get round the security banner in your script. You'll have to use some other mechanism, like any of the many JavaScript UI components that emulate modal dialogs.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜