I 26 posts deep on another thread and am hoping some fresh eyes/ideas might help resolve this issue.
Based on the JS Keystroke below...
1 combo box, 1 text box.
I pasted the following into the combo box--> format-->keystroke
// 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";
aAddr[3] = "901 P Street\rSacramento, CA 95814";
aAddr[4] = "1416 9th Street\rSacramento, CA 95814";
// 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 = addr;
}
})();
I named my text box "locationDetails" without the quotes.
I added 4 value items for my combo box
CSA with ev of aAddr[0]
IT with ev of aAddr[1]
HR with ev of aAddr[2]
CM with ev of aAddr[3]
all the text box says is "undefined".
anything obvious that im doing wrong?