FIX the Google Problem!!!! (script)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AlCapone
    Confirmed User
    • Sep 2003
    • 708

    #1

    FIX the Google Problem!!!! (script)

    Some of you may have noticed that when coloring your pages & sites with stylesheets, you end up with some of the text inputs on your forms a weird yellow color, for areas that have "auto-fill" content contained within them. The Google Toolbar causes this annoyance. This can be obnoxious if you have a light colored text for your form fields., so here's the fix.

    Step 1: Copy the following code and paste it into notepad -
    PHP Code:
      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);
        selectList = document.getElementsByTagName("SELECT");
        for(i=0;i<selectList.length;i++)
          selectList[i].attachEvent("onpropertychange",restoreStyles);
      }
    
      function restoreStyles(){
        if(event.srcElement.style.backgroundColor != "" && event.srcElement.style.backgroundColor != "#a0d0ff"){
          event.srcElement.style.backgroundColor = "#a0d0ff"; /* color of choice for AutoFill */
          document.all['googleblurb'].style.display = "block";
        }
      } 
    
    Step 2: Save this file as "googlefix.js" or whatever you like.

    Step 3: Paste the following code into the [head] of each of your documents where form elements are -
    PHP Code:
    <script type="text/javascript" src="googlefix.js"></script> 
    
    That's it!

    Enjoy!
    Last edited by AlCapone; 02-09-2005, 03:07 AM.
    "You can get more with a kind word and a gun than you can with a kind word alone.”
  • Naughty
    Confirmed User
    • Jul 2001
    • 6479

    #2
    nice, thanks
    seks.ai for sale - ping me

    Comment

    • AlCapone
      Confirmed User
      • Sep 2003
      • 708

      #3
      Bump for the day crew.
      "You can get more with a kind word and a gun than you can with a kind word alone.”

      Comment

      • SmokeyTheBear
        ►SouthOfHeaven
        • Jun 2004
        • 28609

        #4
        bump this is a good tip , i have used it for a couple months now
        hatisblack at yahoo.com

        Comment

        • SmokeyTheBear
          ►SouthOfHeaven
          • Jun 2004
          • 28609

          #5
          cept the code is broken.. put it in a text file and link to it notice gfy parses out the document. with document.hahaha
          hatisblack at yahoo.com

          Comment

          • SmokeyTheBear
            ►SouthOfHeaven
            • Jun 2004
            • 28609

            #6
            its the [] gets replaced with hahaha
            hatisblack at yahoo.com

            Comment

            • leedsfan
              leedsfan
              • Jul 2002
              • 2564

              #7
              Originally posted by AlCapone
              Some of you may have noticed that when coloring your pages & sites with stylesheets, you end up with some of the text inputs on your forms a weird yellow color, for areas that have "auto-fill" content contained within them. The Google Toolbar causes this annoyance. This can be obnoxious if you have a light colored text for your form fields., so here's the fix.

              Step 1: Copy the following code and paste it into notepad -
              PHP Code:
                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);
                  selectList = document.getElementsByTagName("SELECT");
                  for(i=0;i<selectList.length;i++)
                    selectList[i].attachEvent("onpropertychange",restoreStyles);
                }
              
                function restoreStyles(){
                  if(event.srcElement.style.backgroundColor != "" && event.srcElement.style.backgroundColor != "#a0d0ff"){
                    event.srcElement.style.backgroundColor = "#a0d0ff"; /* color of choice for AutoFill */
                    document.all['googleblurb'].style.display = "block";
                  }
                } 
              
              Step 2: Save this file as "googlefix.js" or whatever you like.

              Step 3: Paste the following code into the [head] of each of your documents where form elements are -
              PHP Code:
              <script type="text/javascript" src="googlefix.js"></script> 
              
              That's it!

              Enjoy!

              thanks i was wondering what caused that
              Advertise on Sex2ube.com
              New Tube Content Packages Save $10K +

              Comment

              Working...