Alternative for document.getElementById

mayurt
Tera Expert

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

4 REPLIES 4

Abhinay Erra
Giga Sage

use $. It an element selector part of prototype JS. Go thru this link


Prototype v1.7.3 API documentation | $


Thanks for the quick response Abhinay but it is not working   .


Unfortunately $ is not available in Client Scripts used in the Service Portal. Same for: window, document, jQuery, $$, $j and angular.


Alessandro D_
Tera Contributor

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.