[thelist] IE Field Tip

Joshua Olson joshua at waetech.com
Thu Jul 17 09:16:45 CDT 2003


----- Original Message ----- 
From: "Jeff Howden" <jeff at jeffhowden.com>
Sent: Thursday, July 17, 2003 2:53 AM


> no, it stems from the fact that using the onblur event handler is poor
> programming.  i personally can't think of a practical use for the onblur
> event handler, except on form fields that don't support the onchange event
> handler.

Jeff,

Respectfully, I disagree.  For the life of me I cannot reason why utilizing
the onblur could be considered "poor programming."  Here are a couple
scenarios in which it would be practical to use it:

1.  The client has requested that on a form an image changes as the user
moves from one field to another.  This image perhaps includes additional
instructions on how to use the form field where such instructions need to
include imagery of some sort.  When no field is selected, the image must
return to a default image.

2.  The client would like the background color of the field (or area
directly behind the field) to change color only when a field is selected.
When not selected the color should return to normal.

3.  The client would like the data checked for validity everytime a value in
a particular field is updated and their off-the-wall browser doesn't fire
the onchange even when they paste a value into the field or "undo" an edit
in a field.

Bottom line, given a set of tools, I'm not going to discount certain tools
just because it's _possible_ to abuse them.  Onblur has its uses, just as
does every other function in the javascript arsenal.  Responsibility is the
key, not dogmatic and insulting rules that pronounce that anybody that uses
certain tools is a "poor programmer."

My 2cents, of course.

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com
706.210.0168



More information about the thelist mailing list