SHARE
TWEET

Combo box Keystroke script

acroscript Apr 26th, 2016 (edited) 454 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Custom Keystroke script
  2. (function () {
  3.  
  4.     if (event.willCommit) {
  5.         return;
  6.     }  
  7.  
  8.     var f1 = getField("s");
  9.     var f2 = getField("gr");
  10.     var f3 = getField("b");
  11.    
  12.     // Get the export value of the selected item
  13.     var sh = event.changeEx;
  14.  
  15.     // Show/hide the fields
  16.     switch (sh) {
  17.     case "1" :
  18.         f1.display = display.visible;
  19.         f2.display = display.hidden;
  20.         f3.display = display.hidden;
  21.         break;
  22.     case "2" :
  23.         f1.display = display.hidden;
  24.         f2.display = display.visible;
  25.         f3.display = display.hidden;
  26.         break;
  27.     case "3" :
  28.         f1.display = display.hidden;
  29.         f2.display = display.hidden;
  30.         f3.display = display.hidden;
  31.         break;
  32.     default :
  33.         // If some other combo box item is selected
  34.         // add additional code
  35.         break;
  36.     }
  37.  
  38. })();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top