Password protection help

  • Carpdung
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Nov 14, 2003
  • Posts: 11
  • Status: Offline

Post November 14th, 2003, 8:25 am

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
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post November 14th, 2003, 8:25 am

  • pimpmasta
  • Student
  • Student
  • No Avatar
  • Joined: Aug 23, 2003
  • Posts: 90
  • Status: Offline

Post January 24th, 2004, 10:15 am

This should work.
Code: [ Select ]
<input name="pass" type="password" size="21">
  • Axe
  • Genius
  • Genius
  • User avatar
  • Joined: Jan 07, 2004
  • Posts: 5744
  • Loc: Sub-level 28
  • Status: Offline

Post January 24th, 2004, 12:40 pm

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
  • Joined: Jan 14, 2004
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada
  • Status: Offline

Post January 25th, 2004, 9:49 pm

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 187 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
 
cron
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.