UI Action using GlideModal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2022 03:54 PM
Hello, my objective is to create a glide modal popup box to replace the "confirm" box. This is because "confirm" is not supported by ATF.
The code below opens up a model box.
However when i click the "Close Pop up" button, it does nothing. I was expecting the modal window to close.
Can someone please show me what went wrong?
function test(){ // client code
var gm = new GlideModal('test');
gm.setTitle('Test Pop up');
gm.renderWithContent('<button style="padding:5px;margin-right:10px" onclick="window.closePopup" class="btn btn-default">Close Pop up</button>');
window.closePopup = function(){
gm.destroy();
};
}
I should add, that I used this page as a reference for setting up the above:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-15-2022 03:56 PM
I would recommend using one of the ootb GlideModals instead.
Some examples provided here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2023 08:11 AM
A little late to the party,
but the following should fix your problem:
function test(){ // client code
var gm = new GlideModal('test');
gm.setTitle('Test Pop up');
gm.renderWithContent('<button style="padding:5px;margin-right:10px" onclick="top.window.closePopup" class="btn btn-default">Close Pop up</button>');
top.window.closePopup = function(){
gm.destroy();
};
}