- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2019 11:35 AM
Hello there
I have a requirement where we have a multi choice variable on catalog item, with 3 choices
if choice 3 is selected we need to show a error message , which we are doing with client script , in that error message we are redirecting user to another link , as of now we are just displaying the full link in the error message , can we just use click here and hyper link the user from there ?
instead of www.google.com can we add click here so that it will redirect them to web page in new window?
Below is my on change script
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if(newValue == '2'){
g_form.showFieldMsg('center_access','Please go to www.google.com and my random text', 'error');
}
}
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2019 12:13 PM
Sorry, Hyperlinks are not supported in gs.showFieldMsg method.
please use below code
function onLoad() {
g_form.addInfoMessage("Please <a href = '/incident_list.do'>Click</a>");
}
Regards,
Sachin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2019 01:32 PM
You can't add hyperlink in alert() method.
But, you can use below DOM manipulation in your client script with CAUTION to achieve your requirement
$('element.incident.urgency').insert({
after: '<tr class="info_message_row"><td colspan="2"><div class="outputmsg_info"><img src="images/outputmsg_success.gifx" alt="Please fill up"><a href="http://www.google.com">Google</a></div></td></tr>'
});
Note : DOM manipulation is not recommended since it may break during future upgrade.
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2019 12:11 PM
g_form.showFieldMsg('center_access','Please go to ' + "<a href = 'https://www.google.com'>Click</a>" + ' and my random text', 'error');
Vinod Kumar Kachineni
Community Rising Star 2022
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2019 12:19 PM
Still not working