Monday, 12 December 2016

Barcode vs keyboard input detection

Create Dynamic Action

when key press

Execute JavaScript 

var delay = (function(){
   var timer = 0;
   return function(callback, ms){
      clearTimeout (timer);
      timer = setTimeout(callback, ms);
   };
})();

$("#P101_TEST").on("input", function() {
   delay(function(){
      if ($("#P101_TEST").val().length < 8) {
          $("#P101_TEST").val("");
      }
   }, 50 );
}); 

fire on pageload no.

Example

https://apex.oracle.com/pls/apex/f?p=131188


No comments:

Post a Comment