PDA

View Full Version : A Textbox show Yellow color background


Raju
05-02-2007, 07:06 AM
Hi All,
Can any one help me out, All textboxes in forms either have white background or grey background but only one textbox has a yellow background. How can this happen i havent used Yellow color in by design. How to get rid of this.

Thanks in advance

Raju

edbr
05-02-2007, 07:33 AM
you will have to show some code or a link

chriskq
05-02-2007, 08:38 AM
set a class on the input element eg:

.taLng {
background: #fff;
border: 1px solid #808080;
width: 476px;
height: 38px;
padding: 1px;
widt\h: 474px;
heigh\t: 36px;
}

<textarea id="entry" name="entry" rows="3" cols="" class="taLng"></textarea>


sounds like that google form field add-on thingy is overwritting ur standard colors.

Raju
05-02-2007, 10:50 AM
Hi Chriskq,
What u say is right it is the google thing which overwrite the colors I have used. Is there any way for that, as some computers may have the google thing.

hope u can help me

raju

davidj
05-02-2007, 11:20 AM
try this

this is a work around in Javascript

create a new page (blank) and add

<!--
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 = "";
}//-->



and call it google.js and save it

then in every page where yo have a form just add inside the <head tag...


<script type="text/javascript" src="google.js"></script>

domedia
05-02-2007, 02:04 PM
The yellow comes from your google toolbar to indicate a field that can be automatically filled in.

Other users with the google toolbar will also see this, because it is a functionality they requested. Uninstall the toolbar locally if you do not like it.

Changing this behavior would be like.. uh.. kicking your user in the face ? 8) You're basically disabling a function that they asked to use for your website.

davidj
05-02-2007, 02:05 PM
thats what i meant to say!

domedia
05-02-2007, 02:11 PM
Only the face kicking part, I'm sure..