Skip to content

Commit da58aaf

Browse files
authored
Info message using glide modal (#882)
* Create style.css * Create readme.md * Delete Styles/Add Background Color directory * Create glide_info.js A simple pop-up with an info icon and an "OK" button that stretches with width of the modal window. * Create readme.md * Create glide_warn.js A simple pop-up without an icon. * Update readme.md * Update readme.md Fixed the spelling error of 'clint->client'.
1 parent 42e439a commit da58aaf

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
This script will be helpful to get a confirm box with the help of GlideModal, this can be leveraged in your clint side scripts or UI actions. Confirm and alerts, which we get by
1+
This script will be helpful to get a confirm box with the help of GlideModal, this can be leveraged in your client side scripts or UI actions. Confirm and alerts, which we get by
22
using standard Javascript window methods can be easily blocked by user's browser, but GlideModal confirm will still display and this enhances the User experience.
33

44
With the help of this script we can get a confirmation pop-up with "Don't save", "Cancel", and "Save" buttons.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
var gm = new GlideModal("glide_info", true, 600); // glide_info is the OOB ui page.
2+
gm.setTitle("Info box"); //title of your info box
3+
gm.setPreference("title", "Welcome to ServicNow using GlideModal info box"); //Message shown in the info box
4+
gm.setPreference("onPromptComplete", function() {alert("You clicked on 'Ok'")});
5+
gm.render();
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
var gm = new GlideModal("glide_warn", true, 600); //glide_warn is the OOB UI Page
2+
gm.setTitle("Info message without info icon"); //title of the box
3+
gm.setPreference("title", "Info message text"); //message you want to display
4+
gm.setPreference("onPromptComplete", function() {alert("You clicked on 'Ok'")});
5+
gm.render();
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
These scripts will be helpful to get an Information message with the help of GlideModal, this can be leveraged in your client side scripts or UI actions.
2+
There are two types of info messages which we can be leveraged through GlideModal.
3+
1. It will display a simple pop-up with an info icon and an "OK" button that stretches with width of the modal window.
4+
2. It will displat a simple pop-up without an icon.

0 commit comments

Comments
 (0)