House of Fusion
Home of the ColdFusion Community
Hostmysite ColdFusion Hosting

Search cf-talk

May 12, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
         1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31


For ColdFusion hosting try HostMySite.com.
Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

clearing form fields when tabbing

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Steve Good
03/27/2008 08:43 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Steve Good
03/27/2008 09:14 PM

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 -----


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists
Subscribe Now
Fusion Authority Quarterly Update - ColdFusion 8 Special Edition