how to remove/hide prevent this page from creating additional dialogs in alerts message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 06:52 AM
Hello All,
Kindly help to hide/remove "prevent this page from creating additional dialogs" in alert message using in ui action.
- Kailas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 07:28 AM
I'm pretty sure that message comes from the browser that you are using, not Service-Now. You will have to change the settings in your browser to stop it from displaying that message.
-Steve

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 07:33 AM
Agreed. This is a known feature within the Google Chorme browser. You can't turn it off either (according to http://stackoverflow.com/questions/11729835/how-to-disable-prevent-this-page-from-creating-additiona...)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2016 05:55 AM
Hi Stephen,
This is not for the specific user and i want it through code so that nobody can see that.
Regards
Kailas Bandiwar
- Kailas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-08-2016 06:37 AM
You can't change it through code. It is designed to keep sites from getting you stuck on their page by constantly opening new alerts. If there was a way to turn it off via code, then it would be a useless feature.
That being said, you can create a UI page that just displays a message, then open that UI page with a GlideDialogWindow. Displaying a Custom Dialog - ServiceNow Wiki has a good description of how that works. There is a built in UI page that just displays a message. In a client script or UI action you would use the following code instead of an alert statement:
var dialog = new GlideDialogWindow('glide_alert_standard');
dialog.setPreference('warning','true');
dialog.setPreference('title','Whatever you want the message to say!');
dialog.setTitle('Message for you');
dialog.render();
It's a little more code than just putting in an alert statement, but the user can't block this by checking the "prevent this page from whatever" box. The best part of this approach is that you can completely customize the alert window to include more information, pictures, tables, or whatever other elements you want.
-Steve