Service Catalog Custom PopUp Alert Message on Desktop view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2022 03:04 AM
Hi Team,
I have a challenge which I believe has a simple solution, but I cannot work out the characters to put in my script, to create a simple line break. I have a Custom Popup Alert Message which triggers on the Desktop (as opposed to Service Portal). It is specifically configured for my Service Catalog item (via Catalog Client Script) when accessing from the Desktop interface.
The script I am using is pasted below, which also shows the Message body itself.
But I want to create line breaks between the wording, so that I can space out the sentences leaving a line in between, so that it is easier to read on the pop up alert.
Please help me - what is the coding to use in this specific script, to create line spacing?
Many thanks team, any help appreciated. Here (below) is the catalog client script and also attached in JPG screenshot.
function onSubmit() {
if (g_user.readyForSubmit) return true;
g_user.showAlertPlatform("Terms and Conditions apply to the ordering of this product. Continuing with ordering this product assumes you agree to these Terms and Conditions:");
return false;
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2022 03:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2022 03:26 AM
Hi @WazzaJC ,
function that you are using appears to be custom. I would advise one generic solution, try may be it will work. Try to introduce \n as a line break. It works as a new line. For example:
g_user.showAlertPlatform("Terms and Conditions apply to the ordering of this product.\nContinuing with ordering this product assumes you agree to these Terms and Conditions:");
Regards,
Kamlesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2022 04:04 AM
Hello Kamlesh,
I appreciate you coming back to me. Unfortunately this does not work either, I do not know why.
If you try this on your PDI exactly as I have it, can you confirm it works for you, as I cannot get it to work even if I use the exact script as per your message.
Thanks.
Kind Regards, Warwick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2022 06:34 AM
Hi @WazzaJC ,
I'm not sure that g_user.showAlertPlatform supports html would alert() work instead
Ray