Reputation: 1289
How do I turn off the Firefox feature “prevent this page from creating additional dialogs”?
I get this problem, when I open more than one confirm box(dialog).
Is it possible to prevent this feature via Javascript?
Upvotes: 14
Views: 59623
Reputation: 16595
This is a browser feature and is intended to protect the user. If you could turn it off, all those sites spamming users with dialogs would have a way to stop it.
So in short, no.
Make your application work with it, instead of against it. Don't rely on dialogs/confirmations too much, rather have a modal-box
ask the questions; it is pretty too :)
Upvotes: 16
Reputation: 35
Finally the issue is solved :) , developer need some attention before calling any alert or confirm messages in chrome or firefox. The alert or confirm box will display 1.5 sec delay.
function chromeTimeDelay(){
if (navigator.userAgent.indexOf("Chrome") > 0){
var d =e = new Date();
while(d.getTime()<(e.getTime()+1500)){
d = new Date();
}
}
}
function dontdisplaycheckbox(){
for(var i=0;i<=10;i++){
chromeTimeDelay();
alert("abcdefgh");
}
}
Upvotes: -2
Reputation: 137997
To my knowledge, there is no way to disable it. Alert boxes are obtrusive, and at least in Firefox - can steal focus even from other tabs.
A simple workaround is to use an HTML based modal dialog - this will also give you full control over the dialog, its design (across browsers and operating systems), its buttons, behavior of the rest of the page, etc.
Upvotes: 1
Reputation: 26753
Open about:config
then change the pref dom.successive_dialog_time_limit
Of course this only works for your own browser, you can't change it for other people.
Upvotes: 9