Hello Everyone,
im trying to implement a login screen similar to Facebook. What i mean by this is i want the username and password fields to have text in them until the user selects the textfield. If the user does not type anything in the textfield the the onblur will automatically change it back, but if the user has typed something in then i want the text to be left alone.
At the moment the onblur always changes the value of the textfield. Im not sure how to solve this.
Any one have any ideas?
Thanks and Regards,
-Beano
(code i am using is below)
[code]
<input name=’username’ type=’text’ size=”10″ value=”username” onfocus=”this.value=”” onblur=”this.value=’username'”/>
<input name=’password’ type=’text’ size=”10″ value=”password” onfocus=”this.value=”” onblur=”this.value=’password'”/>
<input type=’submit’ name=’Submit’ value=’Login’ />