getelementByclassname is not working in service portal

sowmya29
Tera Contributor

Hi All,

I m using a  on laod client script :

var labels = document.getElementsByClassName("control-label"); but it is throwing me typeerror: cannot read the property (getElementsByClassName)of null.

Verified Isolate script to false.

Regards,

Sowmya

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Sowmya,

what is your requirement here?

Seems to be duplicate question:

https://community.servicenow.com/community?id=community_question&sys_id=fb521a44dbb704d4414eeeb5ca961964

Regards
Ankur

 

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ashutosh Munot1
Kilo Patron
Kilo Patron

Hi,

May be a Duplicate thread: https://community.servicenow.com/community?id=community_question&sys_id=fb521a44dbb704d4414eeeb5ca96...

Check Isolate script flag on client script.

 

Thanks,
Ashutosh