GlideModal not working, getting console error

Suresh K3
Giga Expert

Hi everyone,

I need a pop it must have only "OK" button.

So i am using OOB model box code, while using that i getting  Error - There is a JavaScript error in your browser console . I checked in console - ReferenceError: GlideModal is not defined. How do i use this model. Can any one assist me

Here is the java script which i have used

 
   

   if(g_scratchpad._action_confirmed) {
        return true;
    }
    
    var dialog = new GlideModal('glide_modal_confirm'false300);
    dialog.setTitle(new GwtMessage().getMessage('Confirmation'));
    dialog.setPreference('body'new GwtMessage().format("Are you sure to save?"));
    dialog.setPreference('focusTrap'true);
    dialog.setPreference('onPromptComplete', doComplete);
    dialog.setPreference('onPromptCancel', doCancel);
    
    dialog.render();
    
    return false;
    
    
   
6 REPLIES 6

Hi Prasad,

Thanks for replying.

I have added GlideModel in script include.

BUt still i am getting the same error - ReferenceError: GlideModal is not defined.

How can i ensure that - is GlideModel in invoking when i call 

SureshK3_0-1688629866895.png

 

Jim Coyne
Kilo Patron

Where have you put your code?  In a Client Script?  UI Action?  Can you include the full configuration of whatever it is?  Full script and screenshots of the setup would help.

 

Also, if you only want an "OK" button in the popup window, you shouldn't be using the "glide_modal_confirm" UI Page, as it displays both "No" and "Yes" buttons:

 

JimCoyne_0-1689315199038.png