[thelist] IE Field Tip

Hershel Robinson hershelr at netvision.net.il
Wed Jul 16 14:33:09 CDT 2003


> > i would use onchange and onpropertychange as suggested by
> the link to msdn
> > provided by another evoltista.  i would *not* use onblur as
> their can be
> > some dire consequences with that event handler when used in
> conjunction
> with
> > focus() and alert().
>
> Jeff,
>
> Please explain.  Thanks.

One known problem is if the onblur event handler ends up calling focus() on
that same field which was just blurred. This means that the user can't leave
that field, because every time he tries to leave, the focus is reset to that
field. :)

I myself would comment (if someone were to ask me for a comment) that using
onblur in and of itself is potentially misleading. An onblur event can occur
when the data in the field has not actually changed. So long as one's code
is aware of this, then all is well, but one needs to realize this. Generally
an onchange event is only needed and/or DESIRED when the data actually
changes.

Hershel



More information about the thelist mailing list