Alternative for document.getElementById
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2016 11:20 AM
Hi All,
I have a UI macro type variable in that i built a tabular form(<table></table>) where i am taking user entered values from an on submit client script by using document.getElementById things work fine till here.
AFTER HELSINKI UPGRADE :
as i want my catalog to be visible on service portal i tried using widgets but from there i am not able to fetch value using document.getElementById
please note : on my client script UI type is Both and i tried using "gel" but still no luck.
Any guidance will be be a great help.
Thank you,
Mayur
- 5,934 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2016 11:26 AM
use $. It an element selector part of prototype JS. Go thru this link
Prototype v1.7.3 API documentation | $
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-13-2016 11:44 AM
Thanks for the quick response Abhinay but it is not working .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2017 05:05 AM
Unfortunately $ is not available in Client Scripts used in the Service Portal. Same for: window, document, jQuery, $$, $j and angular.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2017 05:16 AM
I have not tried it myself but perhaps you could move the script into the widget client controller, if possible, where you won't have those restrictions.