Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"*********" instead of " password"

Status
Not open for further replies.

arshia

Programmer
Oct 10, 2000
4
CA
when Use the following, it open a window which ask for the password, but the password is shown while typing. I want it to be typed ******.. instead of the actuall password.
Thanks.
<SCRIPT language=&quot;JavaScript&quot;>
<!--hide

var password;
var pass1=&quot;password1&quot;;
password=prompt('Please enter your password to view this page!',' ');
if (password==pass1)
alert('Password Correct! Click OK to enter!');
else
{
window.location=&quot; }

//-->

</SCRIPT> [sig][/sig]
 
If you are using an input field on the page instead of a prompt you can do that very easily:
<input type=password>

That may not work for what you are doing, but if you can use a field on the page instead of the prompt you have an easy solution. [sig]<p>Crystal<br><a href=mailto:crystals@genesis.sk.ca>crystals@genesis.sk.ca</a><br><a href= > </a><br>--------------------------------------------------<br>
Experience is one thing you can't get for nothing.<br>
-Oscar Wilde<br>
[/sig]
 
The other option is to use window.open() to launch a new window that mimics the prompt function, but contains the <input type='password'> as identified above. [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top