Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-23-2007, 10:59 AM
Member
 
Join Date: Nov 2007
Posts: 3
roseheyworth is on a distinguished road
Javascript - Password Arrays
Hi,

I am currently creating a password option for my website.

So far I have about 5 people (hey its a start!! They're mates!!)

I have those five passwords in an array called userPasswords.

I have a 'userenterPassword = window.prompt('Please enter password.','');' set up to keep the password in memory.

I have a var UserIndex = 1;

Then I try to set up a for loop:

for(count = 0; count < userPasswords[UserIndex]; count = count + 1)

{
if(userenterPassword != userPasswords)
{

'userenterPassword = window.prompt('Please enter password.','');



}
};


It wont seem to go further this?

Should I be using a WHILE loop for user password wrong entry?

Please 'elp!

Thanks
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-23-2007, 11:47 PM
Member
 
Join Date: Nov 2007
Posts: 8
clement1 is on a distinguished road
I would use a while loop rather than an IF inside a FOR Loop.

If your using passwords as a login to a website, i would use a database to store the details then use PhP to check the username & password against the database rather than just use an array within the website.

This is my personal preference, although it is pretty easy to update the data and moify it when using the database.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

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

vB 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
Javascript into Excel gdj100 Advanced Java 0 03-12-2008 12:03 PM
please help with javascript code!!!! sahkab New To Java 1 11-26-2007 04:20 PM
Javascript Alert mutuah New To Java 0 07-09-2007 12:11 AM
Jsp and javascript Ed JavaServer Pages (JSP) and JSTL 2 07-04-2007 05:54 AM
javascript validation yuchuang New To Java 5 05-14-2007 04:38 PM


All times are GMT +3. The time now is 09:44 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org