Go
New
Find
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Guru 'Power' Mechanic
Picture of Bruceee
Posted
Have you wondered why, when you preview or publish, some form fields are yellow? Thanks to a question Klimt raised via email, here is the answer:

The culprit is the the Google toolbar that people often install in Internet Explorer. Part of the AutoFill feature is to highlight in yellow, #FFFF80, the fields that AutoFill can fill. These are form fields with magic names like "Name" and "Email".

If you also use yellow text as Klimt did, it raises an interesting problem -- yellow text on a yellow background is hard to read! And if you don't have the Google toolbar, you will never see this problem in preview -- for you, the background color the one you expect.

I find AutoFill very useful, and probably so do others. It is possible to disable it by not using the magic names, but you run the risk of annoying some of your visitors -- I get grumpy if I can't AutoFill Frown Conversely, if you do want AutoFill to act on your forms, make sure you use the magic names.

So my suggestions are:
  • Be aware that AutoFill can make certain of your form fields yellow (#FFFF80).
  • Use a compromise text color that still looks good on both a yellow background and your regular background.
  • Last resort: don't use the magic field names.

    A lot more discussion here: http://www.htmldog.com/ptg/archives/000017.php And here: http://toolbar.google.com/autofill_help.html
  •  
    Posts: 9444 | Location: Wellington, New Zealand | Registered: December 11, 2003Reply With QuoteReport This Post
    Guru 'Geezer' Mechanic
    Picture of larryd
    Posted Hide Post
    This javascript code allows you to specify your own background color when the input field is entered and restores the original color when the cursor moves out of the field:
     <script type="text/javascript">
    var saveColor;
    var inputColor = "#ffe4c4"; // This specifies the bgcolor
    
    function setColor(me) {
      saveColor = me.style.backgroundColor;
      me.style.backgroundColor = inputColor;
    }
    
    function resetColor(me) {
      me.style.backgroundColor = saveColor;
    }
    </script> 
    Note that the variable inputColor sets the background color to be used and is a 6-digit hex HTML color value.

    To use, add the following to the Code field of the input text (or textarea) object:
     onfocus="setColor(this);" onblur="resetColor(this);" 


    When used with auto-fill turned on, the normal yellow color is restored when the cursor leaves. (Works on FF2, IE7 and Opera9.)
     
    Posts: 5428 | Registered: December 03, 2006Reply With QuoteReport This Post
    Honorary Mechanic
    Picture of j razz
    Posted Hide Post
    I noticed this after I unknowingly installed the google toolbar which was bundled with a newer version of the divx web player package. I was stumped for a little while but then realized that it was in relation to the toolbar after I uninstalled it.

    j razz
    www.jrazzcreations.com
     
    Posts: 614 | Location: Jackson, TN USA | Registered: October 09, 2005Reply With QuoteReport This Post
    Honorary Mechanic
    Picture of Geek-u-like (Andrew)
    Posted Hide Post
    A different thought on this. I never enable autofill and never get sites to 'remember' my password. Why? Security. I'm not one of the super-paranoid, but no hacker is going to get into my brain, darn I have enough trouble doing that! If you don't store this info on your pc, then its isn't going to get scraped off if your pc is compromised.
     
    Posts: 224 | Location: Elworth, Sandbach, Cheshire, England | Registered: October 20, 2006Reply With QuoteReport This Post
      Powered by Social Strata  
     


    ™ & © 1998 - 2008, Virtual Mechanics Inc. All rights reserved.