DOM manipulation in client script

Hafsa1
Mega Sage

I want to hide (x) icon using client script, how can I use it in getElementById

find_real_file.png

6 REPLIES 6

Alikutty A
Tera Sage

Hi,

You will need to add delete ACL on the Tags table(label) to prevent users from removing it. Please try adding an ACL for it and see if it works for you.

Thanks!

Hafsa1
Mega Sage

ACL doesn't work

Prateek kumar
Mega Sage

Did you happen to see this?

https://docs.servicenow.com/bundle/newyork-platform-user-interface/page/use/common-ui-elements/conce...


Please mark my response as correct and helpful if it helped solved your question.
-Thanks

xiaix
Tera Guru
function onLoad() {
	addAfterPageLoadedEvent(function(){
		var w = false;
		if (top.document.getElementById('gsft_main'))
			w = top.document.getElementById('gsft_main').contentWindow.document;
		if (!w) {
			if (document) {	w = document; }
			else if (top) {	w = top.document; }
		}
		var btn = w.getElementById('cxs_maximize_results');
		if (btn)
			btn.click();
	});
}