DMackallii
asked on
Acroform Javascript-How to copy using a loop?
Greetings All;
Using Adobe Acrobat v8.12 (for WIN)/Javascript how can I copy the semi-colon separated values of TEXTBOX1 into TEXTBOX2? (while adding a sequential ID in front of each copied values (minus the semi-colon)?
Copied values can be separated by a single blank space.
See illustraion below.
I have a working javascript for copying single or multiple selected values of a listbox into a textbox, but can't seem to get it modified correctly. HELLLLPPPPPP!
Thank you for you time and consideration.
´*•.¸(`*•.¸?¸.•*´)¸.•*´
?*°Doris 42DoubleDDs*°•´»?
.¸.•*(¸.•*´?`*•.¸) *•.¸
Listbox1 to Text1 Version
EE-Acroform-Copy-Test-File.pdf
Using Adobe Acrobat v8.12 (for WIN)/Javascript how can I copy the semi-colon separated values of TEXTBOX1 into TEXTBOX2? (while adding a sequential ID in front of each copied values (minus the semi-colon)?
Copied values can be separated by a single blank space.
See illustraion below.
I have a working javascript for copying single or multiple selected values of a listbox into a textbox, but can't seem to get it modified correctly. HELLLLPPPPPP!
Thank you for you time and consideration.
´*•.¸(`*•.¸?¸.•*´)¸.•*´
?*°Doris 42DoubleDDs*°•´»?
.¸.•*(¸.•*´?`*•.¸) *•.¸
Listbox1 to Text1 Version
Custom calculate Keyboard Script in "text1" field:
var textFieldNewValue = ""
var f = this.getField("listbox1");
var a = f.currentValueIndices;
if (typeof a == "number") // A single selection
{
textFieldNewValue = f.getItemAt(a, false);
}
else // Multiple selections
{
console.println("Selection:");
for (var i = 0; i < a.length; i ++)
{
if (i!=0)
{
textFieldNewValue += " ";
}
textFieldNewValue += f.getItemAt(a[i], false);
}
}
event.target.value = textFieldNewValue;
EE-Acroform-Copy-Question-031911.jpgEE-Acroform-Copy-Test-File.pdf
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
´*•.¸(`*•.¸?¸.•*´)¸.•*´
?*°Doris 42DoubleDDs*°•´»?
.¸.•*(¸.•*´?`*•.¸) *•.¸