[thelist] setAttribute in IE

Duncan O'Neill dbaxo at ihug.co.nz
Tue Jun 11 22:48:01 CDT 2002


Timothy Martens wrote:
> 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>

Timothy,

Have you tried 'cellSpacing'? I think I remember
reading somewhere that IE requires camelCaps.

Duncan O'Neill

===================================================




More information about the thelist mailing list