Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Java Script: Concatenate Combo selections

New Here ,
Feb 01, 2016 Feb 01, 2016

Hello Guys,

I went through a lot of web pages and forum and before ending up buying a big book - which won't guarantee a solution - I would like to get your opinion...

Name 1/2/3/4 are COMBO BOXES. I am getting a String with each combo's selection.

questions:

1. how can I clear the string to allow new selection?

2. how can I properly implement the function string.substring(n1,n2) in the script below in order to get only the first two/one digit of each string?

//set the vars

var five = this.getField("Name5");

//this function that checks if the destination field is blank and if so popluates it.

function collatePreSetFieldsTo(populate){

  //always overwrite the value in populate field

  //if(populate.value==''||populate.value==null){

  var one = this.getField("Name1");//COMBO BOX 1

  var two = this.getField("Name2");//COMBO BOX 2

  var three = this.getField("Name3");//COMBO BOX 3

  var four = this.getField("Name4");//COMBO BOX 4

  populate.value=one.value + ' ' + two.value + ' ' + three.value + ' ' + four.value;

  //}

}

collatePreSetFieldsTo(five);

I really appreciate whatever you guys can recommend...

Thanks a lot

FL

TOPICS
Acrobat SDK and JavaScript , Windows
229
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation