Google toolbar autofill in Firefox

Get help on web editors (Frontpage, Dreamweaver) and web languages (HTML, ASP, PHP).
Post Reply
Ashley_Pops
Registered User
Posts: 1035
Joined: 23 Feb 2006, 02:00
Location: Cape Town
Contact:

Google toolbar autofill in Firefox

Post by Ashley_Pops »

Hi Guys

Slight problem that I was hoping someone might be able to help with.

I have Google Toolbar installed on both IE and Firefox, and am busy working on a form at the moment. The text on the form field is white though and cant be seen through the yellow colour that Autofill automatically changes the input boxes to. I've been looking for scripts to disable the colour change in browsers. I've managed to find one that disables the change in IE, but I cant seem to find anything that works in Firefox. Does anyone maybe know some code that would work in Firefox.

The code that I've used in IE is:

Code: Select all

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 = "";
}
Any help would be appreciated. Thanks
Image
Post Reply