Posted by Prakash timilsina Tuesday, January 5, 2010

Share

As you know, the user login box of the website contains the following fields username and password. Furthermore, most of them put the “Username” inside user name field and “********” inside password field to save the space within designing. Do u want to make like this ?
Tradition Concept :


New Concept : Put the cursor in the field below and start typing password


<script language="javascript">
function changeBox()
{
document.getElementById('div1').style.display='none';
document.getElementById('div2').style.display='';
document.getElementById('password').focus();
}
function restoreBox()
{
if(document.getElementById('password').value=='')
{
document.getElementById('div1').style.display='';
document.getElementById('div2').style.display='none';
}
}
</script>
<div id="div1"><input name="pass_temp" type="text" value="Password" size="20" maxlength="20" onfocus="changeBox()" />
</div>
<div id="div2" style="display:none"><input name="password" id="password" type="password" value="" size="20" maxlength="20" onBlur="restoreBox()" />
</div>

0 comments

    v
:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Post a Comment

Goto Top