Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Require Alternative to Strip() function

    I am trying to create a javascript in Acrobat Writer Ver 4 formatting function where the input into a field is a 9 number string "123456789" and the output refreshed in the field needs to read "123 456 789".

    I have tried the strip() function but it would appear that I am either writing code wrong or Acrobat does not support the function as I have noticed on other occasions.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,241
    Thanks
    203
    Thanked 2,554 Times in 2,532 Posts
    I have not encountered the strip() function!

    var str = "123456789";

    var substr1 = str.substr(0,3) /// 123
    var substr2 = str.substr(3,3) /// 456
    var substr3 = str.substr(6,3) /// 789

    newStr = substr1 + " " + substr2 = " " + substr3 /// 123 456 789


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •