In my application there is a VF page contains 5 tabs and each tabs performs different activities.There are 2 checkboxes present on the 2 different tabs. I have created a onclick JS button which uncheck the checkboxes if the checkbox is already checked. Now the problem that I am facing is when I unchecked it, it uncheck all the checkboxes of 2 tabs but I want to perform this activity for current tab only.
I have the following code in my VF which display the current tab name:
function displayPage() {
var current = this.parentNode.getAttribute("data-current");
if (current != null) {
document.getElementById("tabheader_" + current).removeAttribute("class");
document.getElementById("tabpage_" + current).style.display="none";
}
var ident = this.id.split("_")[1];
this.setAttribute("class","active");
document.getElementById("tabpage_" + ident).style.display="block";
this.parentNode.setAttribute("data-current",ident);
}
and I want to get the name/id of the tab in my apex class so that I can use in my IF condition. Can someone help me how can I get the current tab name of VF in apex class?
Note:When I click on a tab,i have to get the name of only those tab.