Mysterious Yellow Form Fields

If you have ever noticed mysterious yellow form fields on websites, or in my case, had a client call and wonder why there are random yellow form fields on a site that you designed when you know you didn’t design it that way, this article should help.

It’s the Google Tool bar in IE, and there is an elegant fix for it that allows you to either disable completely the highlighted fields or customize them and display a special message to Google Toolbar users.

I discovered this fix on Jon Jensen’s blog.  Click here for Jon’s full explaination and fix.

For those who just want the fix without the "blah, blah, blah", here it is:

  1. Add the following javascript to the <head> tag of your HTML document: 
    <script type="text/javascript"><!--
    if(window.attachEvent)
    window.attachEvent("onload",setListeners);

    function setListeners(){
    inputList = document.getElementsByTagName("INPUT");
    for(i=0;i<inputList.length;i++){
    inputList[i].attachEvent("onpropertychange",restoreStyles);
    inputList[i].style.backgroundColor = "";
    }
    selectList = document.getElementsByTagName("SELECT");
    for(i=0;i<selectList.length;i++){
    selectList[i].attachEvent("onpropertychange",restoreStyles);
    selectList[i].style.backgroundColor = "";
    }
    }

    function restoreStyles(){
    if(event.srcElement.style.backgroundColor != "" && event.srcElement.style.backgroundColor != "#a0d0ff"){
    event.srcElement.style.backgroundColor = "#CHANGE_TO_CUSTOM_COLOR"; /* color of choice for AutoFill */
    document.all['googleblurb'].style.display = "block";
    }
    }//-->

    </script>
  2. Change the background color setting in the 5th to the last line where it says #CHANGE_TO_CUSTOM_COLOR" to a color that you would like to use instead of the default Google Toolbar bright yellow.
  3. Add the following above your form, which will render only if the user has the Google Toolbar installed
    <div id="googleblurb" style="display:none;">
      You can use the AutoFill function on the Google toolbar to fill out
      the highlighted fields on this form.
      <a href="http://toolbar.google.com/autofill_help.html"
      title="AutoFill Help Page">Learn more</a>.
    </div>
  4. Done!  Now when the page loads for a user with the Google Toolbar, they’ll see the highlighted forms in a custom color and a custom message explaining to them why they are highlighted.

Flash CS3: Enabling Type Annotation Warnings for Compile-Time Checking

Most ActionScript 2.0 and 3.0 programmers type all variables in their code.

In CS3, to enable the type checking during compilation you must do the following:

  1. Using a text editor open the following file in the Flash CS3 installation folder: /en/Configuration/ActionScript 3.0/EnabledWarnings.xml
  2. Locate the following line: <warning id="1008" enabled="false" label="kWarning_NoTypeDecl">Missing type declaration.</warning>
  3. Change enabled="false" to enabled="true"
  4. Save the file

Attached is the updated configuration file

Famous Hacker Says, “Don’t use Interenet Explorer”

Jonathan "c0mrade" James, famous for hacking into Pentagon and NASA computers at age 15 gave an interview with PC magazine and was asked about the most preventable security holes that he has seen.  He said that un-patched software was at the top of the list, "and don’t use Internet Explorer".

IE is notorious for opening up computers for numerous browser based attacks.  Looks like c0mrade knows all about them.  IMHO, I’d say, use Firefox.

Read the full article.