How to get the hyperlink in Onchange catalog client script
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2024 09:12 PM
Hi All,
I need to get the hyperlink in onchange of catalog client script. I am getting this correctly. But the problem is click here is second link. can we get it in first line.
Script:
var link = '<p><a class="web" target="_blank" href="' + "/sp?id=sc_cat_item&sys_id=" + id + "&sysparm_category=" +cat +'">' + "Click Here" + '</a></p>';
g_form.addErrorMessage(rel+" "+'CIs you are trying to remove has one last relationship with Application Service or Dynamic group which can make the CI orphan.'+""+"Please raise the general Request."+ link);
Thanks,
Suvedha.
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2024 06:03 AM - edited 06-21-2024 06:04 AM
I would get rid of your <p> tags. They aren't required and they are pushing your link to a new line.
It would look like this
var link = '<a class="web" target="_blank" href="' + "/sp?id=sc_cat_item&sys_id=" + id + "&sysparm_category=" +cat +'">' + "Click Here" + '</a>';
If this information helped resolve your issue, please remember to mark response correct and thumbs up to help future community members on this information, thanks!