2

I am trying to develop a PHP Web Interface an Inventory Application. Also, I intend to use this application for TouchScreen Devises like Tablets. There are many forms which needs to be filled within my application besides other touchscreen friendly functionalities.

I would like to find out if are there some jQuery/Javascript possibilities to stop showing keyboard on touchscreen devises? I would prefer to use an external keyboard for typing text in forms.

I found many suggestions like BLUR or Dissable or Readonly inputs. But these suggestion are not good for me, because I would like to type in <input> fields by my external Keyboard, which is impossible if to use suggestions mentioned above.

YakovL
  • 7,557
  • 12
  • 62
  • 102
Sergiu Costas
  • 530
  • 4
  • 8
  • 26

1 Answers1

0

What you need to do is create a new input field, append it to the body, focus it and the hide it using display:none. You will need to enclose these inside some setTimeouts unfortunately to make this work.

 var field = document.createElement('input');
 field.setAttribute('type', 'text');
 document.body.appendChild(field);
 setTimeout(function() {
     field.focus();
     setTimeout(function() {
      field.setAttribute('style', 'display:none;');
    }, 50);
  }, 50);

iOS http://uihacker.blogspot.in/2011/10/javascript-hide-ios-soft-keyboard.html?m=1

Rguarascia
  • 193
  • 3
  • 20