You have to write a handlers for onfocus and onblur events for this textbox like this:
<form>
<input type="text" value="Email" name="Email" style="color:grey;text-align:left;background:white" onfocus='changeTextColor(this, 1)' onblur='changeTextColor(this, 0)'>
</form>
And your handlers will look like this:
function changeTextColor(tBox, c) {
if(c==1) { //textbox on focus
tBox.style.color = "black";
} else { //textbox out of focus
tBox.style.color = "grey";
}
}
Last edited by Luckychap; Dec 2nd, 2008 at 12:28 am.
When you think you have done a lot, then be ready for YOUR downfall.