I’ve done a good amount of research here on Stack Overflow and I’ve tried many of the suggestions of users that have run into the same problem, but have had no luck.
I have this piece of javascript:
<script type="text/javascript">
function ActivateTab(strTabName){
switch (strTabName){
case "EmployeeInfo":
divEmployeeInfo.className = "panelActive";
divCoverageTypes.className = "panelHidden";
break;
case "CoverageTypes":
divEmployeeInfo.className = "panelHidden";
divCoverageTypes.className = "panelActive";
break;
}
}
Here is where it is called:
<table width="100%" border="0" cellSpacing="0" cellPadding="2">
<tr>
<td align="center" id="tdEmployeeInfo" onClick="ActivateTab('EmployeeInfo')" class="tabActive">Employee Information & Demographic Changes </td>
<td align="center" id="tdCoverageTypes" onClick="ActivateTab('CoverageTypes')" class="tabItem"><p>Change, Add or Delete Coverage</p></td>
<td align="center" id="tdSpouseOrPartner" onClick="ActivateTab('SpouseOrPartner')" class="tabItem">Change, Add or Delete Spouse or Domestic Partner</td>
<td align="center" id="tdDependent" onClick="ActivateTab('Dependent')" class="tabItem">Change, Add or Delete Dependent</td>
</tr>
With the corresponding html:
<div id="divEmployeeInfo" class="panelActive">
<input type="hidden" id="SectionTab_EmployeeInfo" name="SectionTab_EmployeeInfo" value="Employee Information">
Can anyone lend a seconds set of eyes?
You’re trying to use an element ID as a Javascript variable.
This is a non-standard IE extension that doesn’t work in actual browsers.
Instead, call
document.getElementByIdto get the DOM element with the given ID: