As usual, develop something in FF and as soon as you get near IE everything decides to pack up and go home.
I'm getting an object expected error, forgive me if it's simple, I'm new to JavaScript.
HTML Code
<div id="tabsCon" class="tabsContainer">
<span id="tab1" class="activeTab" onclick="javascript:changeTab('tab1');">Tab 1</span>
<span id="tab2" class="inactiveTab" onclick="javascript:changeTab('tab2');">Tab 2</span>
<span id="tab3" class="inactiveTab" onclick="javascript:changeTab('tab3');">Tab 3</span>
<span id="tab4" class="inactiveTab" onclick="javascript:changeTab('tab4');">Tab 4</span>
<span id="tab5" class="inactiveTab" onclick="javascript:changeTab('tab5');">Tab 5</span>
<span id="tab6" class="inactiveTab" onclick="javascript:changeTab('tab6');">Tab 6</span>
</div>
JavaScript
function changeTab(tab){
tabCont = document.getElementById('tabsCon');
items = tabCont.getElementsByTagName('span');
var len = items.length;
for (i=1;i<=len;i++){
if (document.getElementById('tab'+i).getAttribute('class') == "activeTab" || document.getElementById('tab'+i).getAttribute('className' == "activeTab")
document.getElementById('tab'+i).setAttribute("class", "inactiveTab");
document.getElementById('tab'+i).setAttribute("className", "inactiveTab");
}
obj2 = document.getElementById(tab);
obj2.setAttribute("class", "activeTab");
obj2.setAttribute("className", "activeTab");
http.open('get', page+'?task=changeTab&tab='+tab);
http.onreadystatechange = handleResponse;
http.send(null);
}
There is obviously more to the .js file but I've included what matters.
As I say, it's all working in firefox, any help would be greatly appreciated.