Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable "prevent this page from creating additional dialogs"?

I'm developing a web app that utilises JavaScript alert() and confirm() dialogue boxes.

How can I stop Chrome from showing this checkbox?

Is there a setting I can modify?

I know I could modify the source code, but I'd like it so that Chrome could still auto-update.

I don't need to worry about other browsers since the app only runs in Chrome.

I have admin access to the (Windows) machines that run the app.

like image 490
Danny Beckett Avatar asked Jul 30 '12 21:07

Danny Beckett


People also ask

How do you enable Prevent this page from creating additional dialogs?

You can't disable it. 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.

How do I undo prevent this page?

If you wish dialog box to be re-activated for the page you set as prevent dialog box to show. Chrome: select settings, a google page for chrome will open with all your settings for chrome. At the very bottom, go to advance settings and at the bottom of the advance settings you may click on Resset Browser Settings...

What does suppress dialogs mean?

The statement SUPPRESS DIALOG can be used to display lists while dynpros are being processed without displaying the screen of the dynpro where the list is created.


2 Answers

You can't. It's a browser feature there to prevent sites from showing hundreds of alerts to prevent you from leaving.

You can, however, look into modal popups like jQuery UI Dialog. These are javascript alert boxes that show a custom dialog. They don't use the default alert() function and therefore, bypass the issue you're running into completely.

I've found that an apps that has a lot of message boxes and confirms has a much better user experience if you use custom dialogs instead of the default alerts and confirms.

like image 81
sachleen Avatar answered Sep 20 '22 21:09

sachleen


This is what I ended up doing, since we have a web app that has multiple users that are not under our control...(@DannyBeckett I know this isn't an exact answer to your question, but the people that are looking at your question might be helped by this.) You can at least detect if they are not seeing the dialogs. There are few things you most likely want to change like the time to display, or what you are actually displaying. Remember this will only notify the user that they are have managed to click that little checkbox.

window.nativeAlert = window.alert; window.alert = function (message) {     var timeBefore = new Date();     var confirmBool = nativeAlert(message);     var timeAfter = new Date();     if ((timeAfter - timeBefore) < 350) {         MySpecialDialog("You have alerts turned off");     } }  window.nativeConfirm = window.confirm; window.confirm = function (message) {     var timeBefore = new Date();     var confirmBool = nativeConfirm(message);     var timeAfter = new Date();     if ((timeAfter - timeBefore) < 350) {         MySpecialDialog("You have confirms turned off");     }     return confirmBool; } 

Obviously I have set the time to 3.5 milliseconds. But after some testing we were only able to click or close the dialogs in about 5 milliseconds plus.

like image 41
DeadlyChambers Avatar answered Sep 19 '22 21:09

DeadlyChambers