
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2017 08:39 AM
I have the following code to make it so that I could use HTML in the help text. This is in an on load script that is in the catalog item client scripts. How can I get this to work in the new Service Portal?
function onLoad() {
//Type appropriate comment here, and begin script below
$$("div.sc-help-text").each(function(item){
var textValue = item.innerText;
$(item).update(textValue);
});
}
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2017 04:36 AM
Hi Brian,
I checked this issue and found that the problem was with the page load time so I added timeout function which will get execute after 1.5 seconds.
Please find below updated script :
function($timeout) {
/* widget controller */
var c = this;
$timeout(function() {
jQuery('p.help-block').each(function() {
jQuery(this).html(jQuery(this).text());
});
}, 1500, false);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2017 03:43 PM
Hi Brian,
Which release version of ServiceNow that you are using? If possible, Can you please try in your personal development instance and share URL of instance ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2017 03:49 PM
Just review the below points:
You should have newly created widget where in client controller below script is present ? and that widget has been added to your catalog item page (sc_cat_item)
- function() {
- /* widget controller */
- var c = this;
- jQuery('p[title="More information"]').each(function() {
- jQuery(this).html(jQuery(this).text());
- });
- }
--
Variable:
In Service Portal :

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2017 05:57 PM
We are on Helsinki Patch 9. Below is my Personal dev instance. I have created a Item called test under hardware category with the code in help text.
Our help text title was changed to "Click Here for More information" so I updated the code as per below.
function() {
/* widget controller */
var c = this;
jQuery('p[title="Click Here for More information"]').each(function() {
jQuery(this).html(jQuery(this).text());
});
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2017 11:50 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2017 04:12 AM
This is still not working for me in my instance or my developers instance.