Click to See Complete Forum and Search --> : tables and styles and JS


Beach Bum
09-14-2003, 01:39 AM
I would like to change the style class of a table column from a JS routine.

I have this

<td id="m1" class="class1" . . .

then I would like to change the class from a JS routine. I am using this JS:

m1.className="class2";

I works fine in IE6 but NS7.1 ignores it. Anyone know how I can make this work in both browsers?

Fang
09-14-2003, 03:38 AM
document.getElementById('m1').className="class2";

Beach Bum
09-14-2003, 10:27 AM
Works great . . . thanks :)