- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2015 12:27 AM
Hi,
How to hide the form sections and tab using client script?
I was trying the below client script with the reference of http://www.servicenowguru.com/scripting/client-scripts-scripting/showhide-form-section/
It was not working, hope it was working fine in Eureka and we are in fuji now and it's not working in fuji, i tested in demo also, the below script not working
function onLoad() {
//Hide the section
var section = $$('span[tab_caption_raw="Questions"]')[0].select('span[id*=section.]')[0];
section.hide();
alert(section);
//Hide the tab
$$('.tab_caption_text').each(function(caption) {
if(caption.innerHTML == 'Questions'){
caption.up('.tab_header').hide();
}
});
}
Could any one please help on this?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2015 01:01 AM
I just tried the below script in Fuji, i can hide the section.
function onLoad() {
var sections = g_form.getSections();
sections[4].style.display = 'none';
}
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2015 01:01 AM
I just tried the below script in Fuji, i can hide the section.
function onLoad() {
var sections = g_form.getSections();
sections[4].style.display = 'none';
}
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2015 02:17 AM
Hi Faizeal,
I am using below code to hide the Section tab in RITM table. Which is working fine. But by using this method I am not able to get the menu list and Field dictionary information by right click.
g_form.setSectionDisplay('variables', false);
I also used sections[2].style.display = 'none'; to hide the section. But facing the same issue.
Could you please let me know if have you faced the problem and how did you fixed that.
Thanks,
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2015 06:21 AM
How many sections you have V V Ayyappaswamy Malluri ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2015 07:16 AM
Hi Faizeal,
I am trying to hide one section. I found the issue. I was using wrong syntax on Client side script. Due to that I was getting unexpected behavior.
Thanks for your reply,
Swamy