- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2018 01:16 PM
Hi Community,
IS it possible to append onclick javascript funtion in HTML source code?
I am trying to append below code to my HTML source code field in knowledge base. But when i update it, it just strips it off. Is it not supported. Any suggestions to fix it>?
Trying to insert this code:
<div class=""SH_Toggle"" onclick=""document.getElementById('Brain_TR').classList.toggle('highlight_row');document.getElementById('Brain_Details_TR').classList.toggle('hide');document.getElementById('Brain_Details_TR').classList.toggle('active_details_row');"">
(More Information: <span style=""color:blue;"">Show/Hide ⇵</span>)</div>
However when i update the page, it just strips it off to this code:
<div class=""SH_Toggle"">(More Information: <span style=""color: blue;"">Show/Hide ⇵</span>)</div>
</div>
Any help on this would be appreciated..
Thanks.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-24-2018 02:13 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-25-2018 06:33 AM
Nice one, glad you got it resolved. For anyone who stumbles upon this in the future, the official documentation on this is here:
Regards
Paul