Changing Characters in password Field

liunx

Guest
i want to change the password character in Password Field in HTML.<br />
say bydefault in XP it is dot<br />
and in win2000 is asterik<br />
can anyone tell me how to do that.<br />
<br />
dhiru<!--content-->good question but I do not know of anyway to change that with html or CSS. As far as I know it is not possible but maybe someone will know something that I am not aware of.<!--content--><script><br />
You could use this script <br />
var pwd=""; // password would be in this var<br />
var chr ="%"; // the char you want to display <br />
var i=0;<br />
function show()<br />
{<br />
pwd += document.getElementById("txt").value.charAt(i);<br />
document.getElementById("txt").value="";<br />
var j=0;<br />
for( ;j<=i;j++) document.getElementById("txt").value+=chr; <br />
i++;<br />
}<br />
</script><br />
<html><br />
<body><br />
<input id="txt" type="text" onkeyup="show()"><br />
<br />
</body><br />
</html><br />
<br />
can be optimised ...<!--content-->I guess there's no other way than tarundhillon's. But his script is very simple and unadvanced. It doesn't allow you to type anything wrong, since deleting any text from the field is impossible (try hitting backspace or del when typing to the field). It requires a lot of tricky coding to make it behave like a real password field...<!--content-->Thanks tarun <br />
i will optimise the code<br />
i thought is ther anyway in CSS where we can change the Character in password field.<br />
only we can use javascript to change the character in field<br />
<br />
Thanks for the suggestion<br />
<br />
dhiru<!--content-->
 
Back
Top