4 Replies Latest reply on Feb 19, 2012 9:30 AM by smarynuk

    Missing Something

    smarynuk

      Hello,

       

      I have the following set up with a combo box and text field.  When I choose the combo box item, all the addresses appear not just the one intended.  I have the "commit selected value immediatley" selected.

       

      Can anyone see what I am doing wrong?

       

       

      // Custom Keystroke script for combo box

      (function () {

       

       

      if (!event.willCommit) {

       

       

      // Set up an array of addresses. \r = carriage return

      var aAddr = [];

      aAddr[0] = "1721 13th Street\rSacramento, CA 95814";

      aAddr[1] = "3500 Industrial Blvd.\rWest Sacramento, CA 95691";

      aAddr[2] = "3310 El Camino Ave.\rSacramento, CA 95821";

       

       

      // Get the export value of the selected item

      var ex_val = event.changeEx;

       

       

      // Get the corresponding address

      var addr = aAddr[ex_val];

       

       

      // Populate the text field with the address

      getField("locationDetails").value = aAddr;

      }

       

       

      })();