RSS

focus password element from password to ********

06 Aug

/**
*  <form>
*  <input type=”text” name=”password” value=”Password” onfocus=”get_password_focus(this)”>
*  </form>
*  This function can be used for focus password element from password to ********
*/

function password_focus(obj)
{
var newO=document.createElement(‘input’);
newO.setAttribute(‘type’,’password’);
newO.setAttribute(‘name’,obj.getAttribute(‘name’));
obj.parentNode.replaceChild(newO,obj);
newO.focus();
}

Advertisements
 
Leave a comment

Posted by on August 6, 2009 in javascript, LAMP, php, Tips, Tricks

 

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: