0

Hi everyone,

I'm a newbbie on javascript... I'm trying to develope a js to compare the first two letters of two fields... Any help would be appritiated!!!!

Thanks
Chris

4
Contributors
4
Replies
5
Views
9 Years
Discussion Span
Last Post by ~s.o.s~
0

Ok, I'm using a CRM Application and I have a Field call X wich have another dependent field called Y. The First dield must be field with a number form 20-80 and the second field with the two digit of the first one plus 4 more digits.
EX.
Field #1 : 21
Field #2: 210132

I need to validate the imput before store it into the DB. How can I store the fields value in an array and compare the first two letters in the array?

Many thanks
CP

0

Just grab hold of the field values using either document.getElementById('elementId') or document.forms['frmName'].elements['elementName'] , store it in variables and compare the characters at the first index of both the strings (make sure you use trim).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.