So I know how to clear form fields when they are clicked using
onClick="this.value=''" but how do I clear them when tabbing through the
form? I looked at onActivate, but it seems pretty much unsupported. I
also read this article
http://www.mindpalette.com/tutorials/clear_defaults/index.php
, but I
have around 50+ fields, and the thought of writing a script that
addresses each field individually does not put a smile on my face.
Anyone have a quick and dirty method of getting this done like the
onClick method?
Thanks again!
--
~Steve
http://goodcf.instantspot.com/blog
Author: Nicholas M Tunney
03/27/2008 08:53 PM
You can add a focus event listener to each form input text element to
clear it when a user tabs to the field, or use onFocus="" for each. The
method that is called would look something like this:
function clearFormField (elID) {
document.getElementById(elID).value = '';
}
Nic
Steve Good wrote:
----- Excess quoted text cut - see Original Post for more -----
--
Nicholas M. Tunney
Blog: http://www.nictunney.com
Adobe Certified Advanced ColdFusion MX7 Developer
Adobe Certified Instructor
Adobe Community Expert
Thanks Nic,
This helped me get these stupid forms done and out of my hair.
~Steve
http://goodcf.instantspot.com/blog
Nicholas M Tunney wrote:
----- Excess quoted text cut - see Original Post for more -----