Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > JavaScript

Reply
 
LinkBack Thread Tools
Old May 23rd, 2007, 05:35 PM   #1
New Member
 

Join Date: Apr 2007
Location: england
Age: 21
Posts: 21
Thanks: 1
Thanked 1 Time in 1 Post
Rep Altering Power: 0 VanHype is on a distinguished road
need help with password

hi, i need help with my coding here... the code works fine... i just need it so that the characters the user types in will be displayed as '*' instead of the actual character, this is only to protect one page...

Code:
  <!--
 
  var password = "password"
  var x = prompt("Enter in the password "," ")
  if (x.toLowerCase() == password) {
  alert("Password correct \n \n Click OK to proceed")
  location = "diary/diary.html"
  }
 
  else {
  location = "incorrect.html"
  }
 
  //-->
VanHype is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 23rd, 2007, 10:11 PM   #2
Elite Veteran
 
Ryan Fait's Avatar
 

Join Date: May 2006
Location: Las Vegas
Posts: 3,784
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough
Re: need help with password

Use the password input.

<input type="password"> instead of <input type="text">.
Ryan Fait is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old May 24th, 2007, 08:05 AM   #3
New Member
 

Join Date: Apr 2007
Location: england
Age: 21
Posts: 21
Thanks: 1
Thanked 1 Time in 1 Post
Rep Altering Power: 0 VanHype is on a distinguished road
Re: need help with password

ok that does help... im not at my computer to play about with that...

only issue there is im not using any 'input' in the code... i am using var x = prompt

will play about with it and see what i can come up with...

thanks
VanHype is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
password


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Forgot password and Change password PHP script Chono PHP 4 May 16th, 2008 05:13 AM
md5 password error csun PHP 2 May 8th, 2007 10:29 PM
Username & Password robukni PHP 13 April 4th, 2007 06:36 PM
lost password itorch Databases 5 December 12th, 2006 09:54 PM
Password Validation s_mazhar HTML, XHTML and CSS 1 October 18th, 2005 05:38 PM


Search Engine Optimization by vBSEO 3.2.0 RC8