Link to home
Start Free TrialLog in
Avatar of finance_teacher
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 "StartingPartMightBeLongOrShortThen 123-45"
      if(FieldArray[4].replace(/^\s+|\s+$/, '') == "StartingPartMightBeLongOrShortThen 123-45")
-----------------------------------------------------------------------------
FAILS, needs to work for all items that end with "123-45"
      if(right(FieldArray[4].replace(/^\s+|\s+$/, '';6) == "123-45")
SOLUTION
Avatar of zephyr_hex (Megan)
zephyr_hex (Megan)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rgonzo1971
Rgonzo1971

HI,

as a remark
;6 instead of ,6

      if(right(FieldArray[4].replace(/^\s+|\s+$/, '',6) == "123-45")

Regards
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial