finance_teacher
asked on
Javascript -- "RIGHT" function ?
How can I change the below .js script
so the "RIGHT" function works ?
-------------------------- ---------- ---------- ---------- ---------- ---------- -
WORKS, but only for this "StartingPartMightBeLongOr ShortThen 123-45"
if(FieldArray[4].replace(/ ^\s+|\s+$/ , '') == "StartingPartMightBeLongOr ShortThen 123-45")
-------------------------- ---------- ---------- ---------- ---------- ---------- -
FAILS, needs to work for all items that end with "123-45"
if(right(FieldArray[4].rep lace(/^\s+ |\s+$/, '';6) == "123-45")
so the "RIGHT" function works ?
--------------------------
WORKS, but only for this "StartingPartMightBeLongOr
if(FieldArray[4].replace(/
--------------------------
FAILS, needs to work for all items that end with "123-45"
if(right(FieldArray[4].rep
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
as a remark
;6 instead of ,6
if(right(FieldArray[4].rep
Regards