Javascript/CSS issue on Win IE
Date: 12/14/07
(Javascript Community) Keywords: no keywords
Here's my
function showPanel(showMe)
{
var tabsetname ="tabsI";
var tabset = document.getElementById(tabsetname).getElementsByTagName('li');
var showMet = showMe+"t";
var tabLshowMe = document.getElementById(showMet).getElementsByTagName('a');
var tabRshowMe = document.getElementById(showMet).getElementsByTagName('span');
tabLshowMe[0].style.backgroundPosition="left top";
tabRshowMe[0].style.backgroundPosition="right top";
var tabL = document.getElementById(tabsetname).getElementsByTagName('a');
var tabR = document.getElementById(tabsetname).getElementsByTagName('span');
var panelsetname ="description";
var panelset = document.getElementById(panelsetname).getElementsByTagName('div');
var i =0;
while(i
{
var hideMe = panelset[i].id;
if (hideMe != showMe)
{
document.getElementById(hideMe).style.display="none";
tabL[i].style.backgroundPosition="0% -42px";
tabR[i].style.backgroundPosition="100% -42px";
}
i++;
}
document.getElementById(showMe).style.display="block";
Same old story works fine on Firefox. Not on IE. So far, it seems that this line var panelset = document.getElementById(panelsetname).getElementsByTagName('div');
doesn't work on IE. And possibly this line var hideMe = panelset[i].id;
Any help would be appreciated.
Source: http://community.livejournal.com/javascript/147669.html