0

I have a textarea in my phonegap app form like

<form name="myform">
<textarea name="myTextarea" id="myTextarea"></textarea>
</form>

I want to set focus on this texarea after pageload and want the keyboard bring up. How can I implement this?

Thanks

Sreehari
  • 515
  • 3
  • 11
  • 27
  • From my experience it's not possible. Read http://stackoverflow.com/questions/6287478/mobile-safari-autofocus-text-field for further details. – Samuli Hakoniemi Aug 07 '12 at 11:32

1 Answers1

0
window.onload = function(){
   document.getElementById('myTextarea').focus();
};
YMMD
  • 3,730
  • 2
  • 32
  • 43