[thelist] JS: DOM generated page, IE & setAttribute() = failure

Matt Warden mwarden at gmail.com
Wed Jun 27 10:19:27 CDT 2007

On 6/27/07, Frank <lists at frankmarion.com> wrote:
> At 02:25 AM 2007-06-27, you wrote:
> >Actually that makes sense that it fails. onclick is an event handler,
> >not an attribute. if you use
> I know. Since the setAttribute() function isn't working for me, what
> can someone recommend as an alternative, a work around, a kludge or a
> reliable manner of getting the job done?

Christian suggested it in his email:

iptYear.onclick = function(){clearField(this);}

setAttribute is to set html attributes. onclick is not an html attribute*.

* technically, there is an html attribute called onclick, but this is
a javascript object property that defines an event handler.

Matt Warden
Cleveland, OH, USA

This email proudly and graciously contributes to entropy.

More information about the thelist mailing list