Hi
I have a basic problem with dropdown list.
my variable alignTxt doesn't work outside function.
var alignmentBox = alignmentBoxGroup.add("dropdownlist", undefined, ["Left","Center", "Right"]); alignmentBox.onChange = function (){ if(this.selection.index==0){ var alignTxt = "ParagraphJustification.LEFT_JUSTIFY"; }; if(this.selection.index==1){ var alignTxt = "ParagraphJustification.CENTER_JUSTIFY"; }; if(this.selection.index==2){ var alignTxt = "ParagraphJustification.RIGHT_JUSTIFY"; }; } myText.justification = alignTxt;
Thanks in advance!