#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2013
    Posts
    1
    Rep Power
    0

    Beginner help requested


    I have created a form in Adobe Acrobat 9 Pro (9.5.5)
    I have created a combo box as the first field on the form, where the user will select a "level". Depending on the level selected, another text field on the form needs to be populated with a value.
    I have read and googled, found many examples, but I am not able to get any to work. I know I have Javascript enabled, as the function to populate the current date works fine, and when I insert the Javascript into the Adobe native script editor, the system does not complain.
    The script I have found, which to my novice way of thinking is the closest to what I think I need is:

    // set “Unit_Cost” field to predefined value based on selection from Combo-box selection
    var sNewSel = event.value;
    switch (sNewSel) {
    case "Student":
    this.getField("Unit_Cost").value = "0";
    break;
    case "Novice":
    this.getField("Unit_Cost").value = "5";
    break;
    case "Intermediate":
    this.getField("Unit_Cost").value = "8";
    break;
    case "Open":
    this.getField("Unit_Cost").value = "8";
    break;
    default: // unknown value -- do nothing
    break;
    }

    The combobox in the form is set to "commit selection value immediately".
    I have tried the above with "mouse down", "mouse up", "mouse exit", "on focus" and "on blur".
    Not sure where to go from here. Any help would be greatly appreciated.
    I have just installed version 11 of Adobe Acrobat Pro, with the same result, ie still no success.
    Last edited by sgrejsen; October 12th, 2013 at 08:13 AM. Reason: updated

IMN logo majestic logo threadwatch logo seochat tools logo