Ask Experts Questions for FREE Help!
  Advanced
Register  |  Log in  
   Ask    
 Answer  
  Help  

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Compiled Languages > Java   »   javascript language for counting characters

 
Question Tools Search this Question Display Modes
Question
 
 
#1  
Old Feb 11, 2008, 10:32 AM
boobiesonthetree
New Member
boobiesonthetree is offline
 
Join Date: Feb 2008
Posts: 2
boobiesonthetree See this member's comment history on his/her Profile page.
javascript language for counting characters

i wonder if anyone can help me please,

i am trying to write code into my program
the code needs to be for counting characters in a password
the user enters a password which must be between 7-15 characters long
if the user enters outsuide this rule then an error message must come up stating exactly how many characters the user did enter and telling them it must be between 7-15 characters.
i have managed to do the error message for the wrong amount of characters but i cant get my head around displaying the amount of characters the user entered
if anybody can help pleaseeeee do thank you

emma

Reply With Quote
 
     

Answers
 
 
Old Mar 31, 2008, 07:39 AM   #2  
manchester thani
New Member
manchester thani is offline
 
Join Date: Feb 2008
Posts: 14
manchester thani See this member's comment history on his/her Profile page.
try using indexAt and charAt methods buddy.....but i am not sure..
  Reply With Quote
 
     
 
 
Old Apr 9, 2008, 12:40 PM   #3  
jstrike
Full Member
jstrike is offline
 
Join Date: May 2007
Location: Wisconsin - Go Packers!
Posts: 389
jstrike See this member's comment history on his/her Profile page.
Code:
function checkPassLength(password); var passLen = password.length; if(passLen<7) { alert("You entered " + passLen + " characters, your password is too short."); return false; } if(passLen>15) { alert("You entered " + passLen + " characters, your password is too long."); return false; } return true; }
  Reply With Quote
 
     


Question Tools Search this Question
Search this Question:

Advanced Search
Display Modes

 
Similar Sponsors

Similar Questions
Question Asker Topic Answers Last Post
Counting Items Amyunimus Spreadsheets 1 Dec 9, 2007 06:44 PM
How to change language in 'Regional and Language Options' without restarting? b44053593 Windows 1 Apr 26, 2007 02:46 AM
35 weeks and counting Jnet29 Pregnancy & New Motherhood 9 Dec 12, 2006 11:16 AM
34 weeks and counting Myth Pregnancy & New Motherhood 7 Aug 10, 2006 05:02 AM
first language literacy and second language litera wagand Teaching 1 Jun 2, 2004 11:51 PM




Copyright ©2003 - 2007, Ask Me Help Desk.
All times are GMT -8. The time now is 02:51 PM.

Content Relevant URLs by vBSEO 3.0.0 RC6 © 2006, Crawlability, Inc.