[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

pulling out each character from a form field

Asked by webmanager in JavaScript

Tags: javascript

I have this script (pasted below), and I want to pull each number out of an input text field and place each number into it's own variable.  I have created the variables, for each number (remove the "-" out from the field), but need to populate each variable.

The script that exists makes sure that what's typed into the text field is either a number or a "-".  I need to populate the variables Num1-Num9 with each number typed in.  I will then need to be able to multiply numbers...so (Num2*4)+(Num4*3)  and so on.  So if you could gimme a hand with that too.

I appreciate your time and help with this one!



--------------------BELOW-----------------------

<html>
<HEAD>
<title>Form Validation</title>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function DUHValidation(duh) {
var matchArr = duh.match(/^(\d{3})-?\d{3}-?\d{3}$/);
var numDashes = duh.split('-').length - 1;
var firstDigit = matchArr;

var Num1="";
var Num2="";
var Num3="";
var Num4="";
var Num5="";
var Num6="";
var Num7="";
var Num8="";
var Num9="";

if (matchArr == null || numDashes == 1) {
alert('Invalid number. Must be 9 digits or in the form NNN-NNN-NNN or NNNNNNNNN.');
msg = "does not appear to be valid";
}
else
if (parseInt(matchArr[1],10)==0) {
alert("Invalid number: Numbers's can't start with 000.");
msg = "does not appear to be valid";
}
else {
msg = "appears to be valid";
alert(duh + "\r\n\r\n" + msg + " Number.");
   }
}
//  End -->
</script>
</HEAD>

<BODY>
<form>
SS #:  <input type=text name=duh size=11 maxlength=11> (use dashes!)
<p>
<input type=button value="Validate Number" onClick="DUHValidation(this.form.duh.value);">
</form>
</body>
</html>
[+][-]06/26/01 03:13 PM, ID: 6229410Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: JavaScript
Tags: javascript
Sign Up Now!
Solution Provided By: zvonko
Participating Experts: 4
Solution Grade: A
 
[+][-]06/20/01 01:31 PM, ID: 6212073Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/20/01 01:39 PM, ID: 6212102Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/20/01 01:54 PM, ID: 6212164Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/20/01 02:12 PM, ID: 6212216Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/20/01 02:28 PM, ID: 6212255Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/21/01 08:44 AM, ID: 6215007Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/25/01 12:47 PM, ID: 6225042Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/25/01 01:50 PM, ID: 6225322Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/25/01 01:52 PM, ID: 6225329Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/25/01 01:54 PM, ID: 6225338Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/25/01 02:02 PM, ID: 6225371Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06/26/01 11:32 AM, ID: 6228725Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/27/01 05:30 AM, ID: 6231053Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06/27/01 08:02 AM, ID: 6231790Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92