quick javascript for a field anyone?

Messages
41
i was wondering if someone could find the quick script so i can have the login boxes like on vbulletin, where it says username but you click inside the username box and the text disappears...

go here:http://www.vbulletin.com/forum/

and click in the username box to get what im sayign

anyone know how, i couldnt get it from the source to the point where i understood it

Code:
<form action='login.php' method='POST'>
<table style='border:1px solid #000000;'>
<tr>
<td align='right'>
<input type='text' size='15' maxlength='25' name='username' value="Username">
</td>
</tr>
<tr>
<td align='right'>
 <input type='password' size='15' maxlength='25' name='password' value="password">
</td>
</tr>
<tr>
<td align='center'>
<input type="submit" value="Login">
</td>
</tr>

</table>
</form>
</center>

thats my login field
 
<input onclick="this.value=''" value="your@email" name="email_address" />
<input onmouseover="this.value=''" value="your@email" name="email_address" />

both work, but the best way (because not everyone uses a mouse. is (as you pointed out).

<input onfocus="this.value=''" value="your@email" name="email_address" />
 
Back
Top Bottom