[thelist] DOM - adding a function to a dynamically addedelement...

Matt Warden mwarden at gmail.com
Mon Apr 25 21:43:45 CDT 2005


On 4/25/05, Jeff Howden <jeff at jeffhowden.com> wrote:
> Pavel,
> 
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > From: Pavel Dudrenov
> >
> > First don't use setAttribute cuz' that wont work on IE.
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> 
> This simply isn't true.  setAttribute() works just fine in IE6+.

Are you certain? From my testing, if one tries to set attributes like
'style' using setAttribute rather than the property method, it fails
in IE6 (and lower, of course).

In fact, here's a page on PPK's site that seems to indicate this as well:
http://www.quirksmode.org/dom/w3c_core.html (Ctrl+F setAttribute)
There is a test page where you can verify for yourself.

Thanks,

-- 
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.


More information about the thelist mailing list