...

View Full Version : Require Alternative to Strip() function



chefroy
12-06-2006, 05:11 PM
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.

Philip M
12-06-2006, 05:58 PM
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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum