Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Aug 2005
    Posts
    365
    Thanks
    7
    Thanked 1 Time in 1 Post

    Question Form fields automatically get yellowish in IE

    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???

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Google auto-fill or another helper toolbar for IE?

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Posts
    365
    Thanks
    7
    Thanked 1 Time in 1 Post
    Yea, I've Google Toolbar installed.

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I use this to get rid of those
    Code:
    <!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>
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •