I have two functions both work in Firefox and Netscape but only one works in
IE. Both are working on different <DIV> tags. My CSS is an external file, I
linked it to the html file.
CSS
div.a
{
width: 1%;
background-color: #9900FF;
height: 5%;
}
div.b
{
width: 100%;
background-color: #95F209;
height: 1%;
}
JavaScript
function doWidth()
{
var Wdiv = document.getElementById("width");
Wdiv.style.width = forWidth+'%';
if(forWidth++ > 99)
forWidth = 0;
setTimeout("doWidth();",10);
}
function doHeight()
{
var Hdiv = document.getElementById("height");
Hdiv.style.height = forHeight+'%';
if(forHeight++ > 10)
forHeight = 0;
setTimeout("doHeight();",10);
}
HTML
<div id=width class="b"> </div>
<BR>
<div id=height class="a"> </div>
can someone point out my mistake here?