Opening an external file containing javascript code


i'm trying develop pdf in 2 languages. when pushing button, questions , list-of-values possible answers should translated.

 

i created , initialized several variables 2 language phrases javascript. inside code.

 

is there anyway when button pressed external file read, bringing javascript code questions ans list-of-values? concern have duplicated code, if want implement three, 4 languages grow without control.

 

this example wrote in code:

 

var txtauxl1esp = new array();

var txtauxl1ing = new array();

txtauxl1esp[0]=", como ";

txtauxl1ing[0]=", such ";

txtauxl1esp[1]=": el último año ha obtenido ";

txtauxl1ing[1]=": last year obtained ";

txtauxl1esp[2]="%, en los últimos tres años ";

txtauxl1ing[2]="%, in last 3 years ";

txtauxl1esp[3]="% y en los últimos cinco años ";

txtauxl1ing[3]="% , in last 5 years ";

//...

 

if (p1.btnidioma.border.edge.stroke == "raised") {

    var txtauxl1=txtauxl1esp;

    var txtauxl2=txtauxl2esp;

    var txtauxl3=txtauxl3esp;

}

else {

    var txtauxl1=txtauxl1ing;

    var txtauxl2=txtauxl2ing;

    var txtauxl3=txtauxl3ing;

}

 

what thinking store txtauxl1ing in 1 file, txtauxl1esp in file , read them javascript code inside pdf. possible?

 

regards

jc

anybody can me question?



More discussions in LiveCycle Designer


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support