...

View Full Version : Text Field Colors Question



Dan6971
01-13-2004, 10:47 PM
Hello,
Right now, on my page, I have text fields that are white, & when you click into the text fields, they turn from white to green.

How can I have them change colors from green to white?

Here Is My Page (http://www.pianomanfan.com/test.html)

This Site Has What I Am Speaking About In Red, On The Left (Scroll Down) (http://www.taschen.com/)


Thanks,
Dan

fredmv
01-13-2004, 10:56 PM
No JavaScript required.
<style type="text/css">
/*<![CDATA[*/
input:focus {
background-color: #090;
}
/*]]>*/
</style>

Dan6971
01-13-2004, 11:59 PM
I tried that, but it didn't seem to work... I did try to copy the code that www.Taschen.com used.

I was able to make the TEXT FIELDS always green, but when clicking around the page, the TEXT FIELDS sometimes change back to white.

Please help me to always have green.

Also, the 3rd search is now showng an error.


THANKS FOR THE HELP,
Dan

Garadon
01-14-2004, 12:22 AM
ur fields all 3 of them has this in them

style="background-Color=#CCFF99" onFocus="this.style.backgroundColor='#CCFF99'" onBlur="this.style.backgroundColor='#CCFF99'"

if u replaced that with
style="background-color :#CCFF99;"

they should stay that green color

Dan6971
01-14-2004, 12:44 AM
Garadon...

I tried that, but they are turning white.

Are you certain that your code is right? Also, did it work for you?

Plus, how come I have an error in the last search?


THANKS SO MUCH!!!
Dan

Garadon
01-14-2004, 01:05 AM
try replacing ur highlight function



var oldbackgroundColor;
//Function to highlight form element
function highlight(e)
{
eventobj=ns6? e.target : event.srcElement
if (previous!='')
{
if (checkel(previous))
previous.style.backgroundColor=oldbackgroundColor;
previous=eventobj;
oldbackgroundColor=previous.style.backgroundColor;
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor;
}
else
{
if (checkel(eventobj))
eventobj.style.backgroundColor=highlightcolor;
previous=eventobj
}
}

Dan6971
01-14-2004, 01:10 AM
Garadon...


YOU F*CKING GENIUS!!!


Now, can you help me with the "error" that is showing up in the last search?



Thanks!!!!!!!!!!!!!!!!!
Dan

Garadon
01-14-2004, 01:21 AM
in the input field for that search u have this
onclick="cleartext(this)"

either remove it or make a function called that.

Dan6971
01-14-2004, 01:48 AM
King Garadon...

Is it possible to add the "Clear Text" thing only to my first TEXT BOX? I added a Clear Text Function, but it doesn't seem to work.

Also, the errors are gone!!!



THANKS 1,000,000%!!!
Dan



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum