MaTaX
05-11-2009, 04:01 PM
Ok I have this event on a text box that clears the text inside when focused on, but I also want it to change to light blue like the other text boxes I have when clicked on.
The other boxes use onFocus events, and I'm having trouble figuring out how to call both functions with the one event handler, I would like to not have to add the light blue background as a function to my clearing effect, but if it must be done thats ok.
Heres my code...
This is to clear the text box...
function checkclear(what){
if(!what._haschanged){
what.value=''
};
what._haschanged=true;
}
And this is what makes the BG's light blue when focused on...
onfocus="this.className='focus'" onblur="this.className='normal'"
Which calls this Internal CSS...
.normal
{
background-color:white;
}
.focus
{
background-color:lightblue;
}
If I'm not clear ask any questions that you like.
The other boxes use onFocus events, and I'm having trouble figuring out how to call both functions with the one event handler, I would like to not have to add the light blue background as a function to my clearing effect, but if it must be done thats ok.
Heres my code...
This is to clear the text box...
function checkclear(what){
if(!what._haschanged){
what.value=''
};
what._haschanged=true;
}
And this is what makes the BG's light blue when focused on...
onfocus="this.className='focus'" onblur="this.className='normal'"
Which calls this Internal CSS...
.normal
{
background-color:white;
}
.focus
{
background-color:lightblue;
}
If I'm not clear ask any questions that you like.