- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2016 01:37 AM
Hello,
I have the following client script:
--------------------
function onChange(control, oldValue, newValue, isLoading) {
if (newValue == '')
return;
if (newValue == 'ABC')
g_form.addInfoMessage('Please see knowledge article KB0011111');
else
g_form.clearMessages();
----------------------
This script will add an info message at the top of the page when value is ABC. My question is, can I make the KB number as a hyperlink so that people could click on the KB number and be redirected to the its page?
Thanks,
Alex
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2016 02:20 AM
Hi Alexandru, Michal
It is possible to add the link in the addinfomessage. Please find the sample script below.
function onLoad() {
g_form.addInfoMessage("Please <a href = '/incident_list.do'>Click</a>");
}
Replace the above url with the one your looking to add.
Thanks
Abhishek
PS - Please mark this Helpful, Like, or Correct Answer if relevant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2016 02:20 AM
Hi Alexandru, Michal
It is possible to add the link in the addinfomessage. Please find the sample script below.
function onLoad() {
g_form.addInfoMessage("Please <a href = '/incident_list.do'>Click</a>");
}
Replace the above url with the one your looking to add.
Thanks
Abhishek
PS - Please mark this Helpful, Like, or Correct Answer if relevant.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2016 02:30 AM
Thank you very much Abhishek! It works !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2017 01:36 PM
Hi Abhishek,
how do I add external link(link to Jive document) in addinfomessage?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2017 12:38 AM
Hi Ashwini,
It is similar to any other link you can add.
example:
instead of google.com you can add link to your jive
g_form.addInfoMessage("Please <a href = 'http://www.google.com' target='_blank'>Click</a>");
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2017 11:43 AM
This worked Ankur, Thanks