- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2020 05:47 AM
How can we remove the highlighted message from the confirm box?
I have used confirm function for the pop up but want remove the instance says(highlighted) message here attached in screenshot.
function Test(){
var ans = confirm("This is the confirmation msg click ok");
if (ans == false) {
return false();
}
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2020 06:13 AM
You can create a Confirmation Modal:
var dialog = new GlideModal('glide_modal_confirm', true, 300);
dialog.setTitle(new GwtMessage().getMessage('Confirmation'));
dialog.setPreference('body', new GwtMessage().format("Your message"));
dialog.setPreference('focusTrap', true);
dialog.setPreference('onPromptComplete', doComplete);
dialog.setPreference('onPromptCancel', doCancel);
dialog.render();
function doComplete() {
callback(true);
}
function doCancel() {
callback(false);
}
No need to create a UI Page.
https://gist.github.com/icerge/4c29728c4a8cf0c04ef8bc8cf14519c1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2020 06:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2020 08:33 AM
Hi Tabassum,
Hope you are doing well.
Is your question resolved? Or do we need to follow-up on this?
Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.
Kind regards,
Willem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2022 03:31 AM
Hi Willem,
Onchange script for my check box
var dialog = new GlideModal('glide_modal_confirm', true, 300);
dialog.setTitle(new GwtMessage().getMessage('Confirmation'));
dialog.setPreference('body', new GwtMessage().format("Your message"));
dialog.setPreference('focusTrap', true);
dialog.setPreference('onPromptComplete', doComplete);
dialog.setPreference('onPromptCancel', doCancel);
dialog.render();
function doComplete() {
g_scratchpad._action_confirmed = true;
callback(true);
}
function doCancel() {
callback(false);
}
I have tried above code for my catalog and from portal getting error like "There is a JavaScript error in your browser console" in that screen Control+shift+J
(g_env) [SCRIPT:EXEC] Error while running Client Script "Cox_OwnersApproval request": ReferenceError: GlideModal is not defined
So how to solve this problem.
Please help me out .
Thanks & Regards,
Pavana