Password protection help

  • Carpdung
  • Newbie
  • Newbie
  • Carpdung
  • Posts: 11

Post 3+ Months Ago

Hi there,

I recently placed a simple password protection Javascript into an html code and it works fine. However, when the user types the password it shows up. How do I keep the password from being displayed?

I know that within forms I can set type="password", but not sure how to do it in this case.

Thanks for the help! :?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • pimpmasta
  • Student
  • Student
  • pimpmasta
  • Posts: 89

Post 3+ Months Ago

This should work.
Code: [ Select ]
<input name="pass" type="password" size="21">
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

With JavaScript, there is no way to prevent the password from being displayed in one form or another as it's client-side.

You'd need to use a PHP script or some other server-side scripting language to hide it.

Or, you could simply use .htaccess protection, and have a box pop up.
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

Do you mean you want to see "*" instead of each character entered?

<form>
<input type="password">
</form>

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 119 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.