I need a text input field to be ready to type into as soon as the page opens. I've found a couple of questions like this answered, but none of them seem to be specific to whether or not it's possible to do on an iPad.
I'm using this javascript:
window.onload = function(){
var text_input = document.getElementById('barcode');
text_input.focus ();
text_input.select ();
}
and my HTML for the input is this:
<input type="text" name="text" class="textinput" id="barcode">
When I test the webpage in Google Chrome it works, but when I test it on my iPad it doesn't. I've also tried the HTML5 autofocus element, but I've heard that doesn't work on iPad either.