A friend of mine gave me a script that does exactly what I wanted. It adds reminder text to a text box when the page loads and onBlur if the box is empty. The only thing I want to change is I want the helper text to also have style=color:#888888 and the user text to have style=color:#000000.
I'm a complete novice and I know the work is pretty much already done but I don't know how to add a style change onto this code in an efficient way. Thanks for any help.
Code:<script language="javascript"> function subType(a, b){ if(a.value==b){ a.value=''}else if(a.value==''){ a.value=b; }else{ a.value=a.value; } } function chkType(a, b){ if(a.value==''){ a.value=b; }else{ a.value=a.value; } } </script> <input name="subType" type="text" id="txtType" onfocus="subType(this, 'Sub Type');" onblur="chkType(this, 'Sub Type');" value="Sub Type"> <input name="artist" type="text" id="txtEmail" value="Email" onfocus="subType(this, 'Email');" onblur="chkType(this, 'Email');">


Reply With Quote

Bookmarks