Client-side code should not use DOM manipulation technique

phani24
Tera Contributor

Hi,

we recently run a health scan and wanted to change DOM calls and the given recommendation is 

"find_real_file.png"

can someone help me on how we can achieve this without disturbing the ongoing fucntionality

8 REPLIES 8

Hi Phani,

I think DOM, jQuery is not recommended to be used in client side

Mark āœ… Correct if this solves your issue and also mark šŸ‘ Helpful if you find my response worthy based on the impact.
Thanks
Ankur

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

@phani 

Hope you are doing good.

Did my reply answer your question?

If my response helped you please mark it correct to close the question so that it benefits future readers as well.

Regards
Ankur

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

@Ankur Bawiskar 

 

I am doing health scan remediation and I found similar kind of issue in below to avoid DOM function using in catalog client script.

 

var attachments = document.getElementById('header_attachment_list_label');

 

Please suggest me to modify script instead of that.

shloke04
Kilo Patron

Have you tried using "g_form.getControl('name');" instead of document.getElementByID and see if that works for you.

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke