...

View Full Version : Form fields automatically get yellowish in IE



Uzair
09-19-2006, 03:10 PM
I'm designing a web form & when I preview it in Internet Explorer, IE automatically turns field's backgroun color to Yellow. Why is this happening???

nikkiH
09-19-2006, 11:35 PM
Google auto-fill or another helper toolbar for IE?

Uzair
09-20-2006, 06:50 AM
Yea, I've Google Toolbar installed.

_Aerospace_Eng_
09-20-2006, 07:19 AM
I use this to get rid of those

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<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()
{
var defaultColor = "#FFF";
if(event.srcElement.style.backgroundColor != "" && event.srcElement.style.backgroundColor != defaultColor)
{
event.srcElement.style.backgroundColor = defaultColor; /* color of choice for AutoFill */
document.getElementById('choice').style.display = "inline";
}
}
</script>
</head>

<body>
<form action="#" method="post">
<input type="text" name="name">
<input type="text" name="email">
</form>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum