[thelist] setAttribute in IE

Timothy Martens timfm at hawaii.rr.com
Tue Jun 11 19:51:01 CDT 2002


I'm trying to manipulate the cellspacing of a table element using
setAttribute. It works fine in N6/Moz1 (pc) but not IE. I know I've done
something with setAttribute in IE before but seem to recall it involved
and object (obj). Can some one nudge me in the right direction?

  function cellSpc(val) {
    var x = document.getElementById("swatch");
    x.setAttribute('cellspacing', val);
  }

<a href="#" onclick="cellSpc(0)">Option 1</a>
<a href="#" onclick="cellSpc(1)">Option 2</a>
<a href="#" onclick="cellSpc(16)">Option 3</a>

<table cellspacing="1" id="swatch">
etc....

 t.

::::::::::::::::::::::::
<!--timothy martens
timfm at hawaii.rr.com-->




More information about the thelist mailing list