Confirmation Dialog box - No alert - client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2020 05:15 AM
Hi All,
I have a catalog client script in which I am making Ajax calls to the Script Include. That script includes checks some data in the tables and returns the output to the client script. Now in the catalog client script, I have to show that response as a message box in the Service Portal.
I am able to show it as an alert statement but it looks really dirty. How can I generate a message box and show the content in it?
I found an article but I am not sure how to use them in client script - Link Here
Thank you, appreciate your response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2020 08:11 AM
Not useful. Can you try them and share the code snippet?
Just try with the hardcoded value "Welcome Message"
Show this message on the Portal in onSubmit catalog client script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2020 10:45 AM
Yes,why not.let me try it on my instance
Regards
Yash Agrawal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2020 02:35 PM
Hi,
Could you please have a look on the below link and give a try.
dialog window in client script - alternative for service portal needed
Regards,
Alok
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2020 04:29 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2020 06:12 AM
Try the following:
- From Application Navigator. "System UI" > "UI Page"
- Create new UI Page
HTML
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<table width="300">
<tr><td>Just letting you know that something happened.</td></tr>
<tr><td>Nothing to worry about...</td></tr>
</table>
<br />
<table width="300">
<tr><td><button class="btn btn-default" id="cancel_button" onclick="window.GlideModalForm.prototype.locate(this).destroy(); return false" style="width:100%;background-color:#008477;color:white;font-weight:bold;" title="" type="submit">OK</button></td></tr>
</table>
</j:jelly>
3. Then in Client Script on Catalog (need to replace name of GlideModel with name of UI Page created above.
try {
var gm = new GlideModal('Sample dialog'); // replace "Sample dialog" with of UI Page create above.
gm.setTitle('Info Alert');
var title = gm.getPreference('title');
gm.setWidth(350);
gm.render();
} catch (err) {
var modalInstance = spModal.alert('<h3>Info Alert</h3><hr/>Just letting you know that something happened.<br/>Nothing to worry about...').then(function() {
});
}