In the Vf page where I created a tab. I want to make enable or disable if the checkbox is true.but my code is not working
here is my code:
<li class="slds-tabs_scoped__item tabs_scoped-li-2" title="Documents" role="presentation"><a style="text-decoration:none;" class="slds-tabs_scoped__link" href="javascript:onChangeTab('2');" role="tab" tabindex="-1" aria-selected="false" aria-controls="tab-scoped-2" id="tab-scoped-2__item" disabled ="{!IF(mfdConfigSetting.Documents_Tab_View__c== true , false, true)}">Documents</a></li>
javascript code which is used here is:
function onChangeTab(tabName){
j$('#selected-record').html('');
j$('#dvDownloadFileDetails').hide();
clearJavascriptMessage();
j$('.slds-tabs_scoped__item').removeClass('slds-is-active');
j$('.slds-tabs_scoped__item a').attr('aria-selected', 'false');
j$('.tabs_scoped-li-' + tabName).addClass('slds-is-active');
j$('#tab-scoped-'+ tabName + '__item a').attr('aria-selected', 'true');
j$('.slds-tabs_scoped__content').hide();
j$('#tab-scoped-' + tabName).fadeIn(1000);
if(tabName == '2') {
if(!{!$ObjectType.Document.accessible}){
j$('#tab_dvDocuments').hide();
showInfoMessage('You don\'t have access to Document object. Please ask your System Administrator to grant you access to the same.');
return;
} else {
getAllDocumentsByFolder();
}
to make tab disabled i didn't use a javascript function i used only disabled ="{!IF(mfdConfigSetting.Documents_Tab_View__c== true , false, true)}"
here Documents_Tab_View__c is a checkbox