These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Dropdown box script question

Meabh
Registered: Feb 24 2006
Posts: 20

Got this script off the Acrobat User Community courtesy of Thom Parker. I can adjust it to do what I need but it doesn't allow a bar space in the name of the dropdown option. In the script its 'Accounting' that I need to change to District Court but the error message is "Missing : after property id"

Here's Thoms script:

// Place all prepopulation data into a single data structure
var DeptData = { Accounting:{ contact: "Court Name",
email: "Address ",
deptnum1: "address2",
deptnum2: "city, state, zip" }};
function SetFieldValues(cDeptName)
{
this.getField("DeptContact").value = DeptData[cDeptName].contact;
this.getField("DeptEmail").value = DeptData[cDeptName].email;
this.getField("DeptNumber1").value = DeptData[cDeptName].deptnum1;
this.getField("DeptNumber2").value = DeptData[cDeptName].deptnum2;
}

This is the link to the complete article -
http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/change_another_field/

Any thoughts?
Meabh

gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
All the conrol is in the combo box. Add the dashes to the combo boxes "Option" and modify the "Custom Keystroke" to treat the dash lines like the space option.

http://www.adobeforums.com/webx/.3c05c5c2/0

George Kaiser