Code Sample
//WORKS FOR FF but NOT IE
function change(id){
c1 = document.getElementById(“c1”);
c2 = document.getElementById(“c2”);
c3 = document.getElementById(“c3”);
m1 = document.getElementById("m1");
m2 = document.getElementById("m2");
m3 = document.getElementById("m3");
if(id==1)
{
c1.style.display = ""
m1.style.color = "#cc0000";
c2.style.display = "none";
m2.style.color = "#444444";
c3.style.display = "none";
m3.style.color = "#444444";
}
//WORKS FOR IE but NOT FF
//notice that i deleted the 1st 6 lines.
function change(id){
if(id==1)
{
c1.style.display = “”
m1.style.color = “#cc0000”;
c2.style.display = "none";
m2.style.color = "#444444";
c3.style.display = "none";
m3.style.color = "#444444";
}
i tried renaming the vars in the statements like:
c3 = document.getElementById(“c3”);
it’s not helping.
I thought about checking for the browser but There are more browser than just IE and FF, and I would have no way to check it.
and the 2nd reason im not checking for different browser is that i think that the problem comes from me.
Any idea anyone?
Thx