if (!USER) { $ret = " <div id='xlogin'> <form method='post' action='$_SERVER[PHP_SELF]'><fieldset> <input class='tbox' type='text' name='username' size='15' value='".LAN_THEME_5."' maxlength='20' onclick=\"this.value=''\" /> <input class='tbox' type='password' name='userpass' size='15' value='".LAN_THEME_6."' maxlength='20' onclick=\"this.value=''\"/> <input type='hidden' name='autologin' value='1' /> <input class='button' type='submit' name='userlogin' value='Login' /> </fieldset></form> </div> PHP: This works at removing the text thats already in the field when they click on the field so the user can enter his info without having to manually delete the text in the field. However when the user tabs to the next field he has not clicked it so it is still full of text and must be manually deleted. My question is is there some sort of on tab method that could fix this problem?
The JavaScript events you should be using is onfocus() when entering field, onblur() is fired with exiting if you need it.