Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this this piece of html code:

    <form name="postcode" method="post" onsubmit="return OnSubmitForm();">
<input class="postcode" maxlength="1" size="1" name="c" onKeyup="autotab(this, document.postcode.o)" /> 
<input class="postcode" maxlength="1" size="1" name="o" onKeyup="autotab(this, document.postcode.d)" /> 
<input class="postcode" maxlength="1" size="1" name="d" onKeyup="autotab(this, document.postcode.e)" /> 
<input class="postcode" maxlength="1" size="1" name="e" /> <br />

which uses this javascript:

Auto tabbing script- By JavaScriptKit.com
This credit MUST stay intact for use
function autotab(original,destination){
if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
</script><script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
<script src="js/scripts.js" type="text/javascript"></script>

<script type="text/javascript">
function OnSubmitForm()
  if(document.postcode.operation[0].checked == true)
    document.postcode.action ="plans.php";
  if(document.postcode.operation[1].checked == true)
    document.postcode.action ="plans_gas.php";
  if(document.postcode.operation[2].checked == true)
    document.postcode.action ="plans_duel.php";

  return true;

As soon a you enter in one character into one of the text boxes it automatically tabs across the the next text box.

This works fine on a pc or mac and on safari and also in all other browsers. But when viewing the webpage on an iPad or iPhone (using safari) the auto tabbing function does not work.

Any ideas on how to make the auto tab work on these mobile devices?

share|improve this question

closed as off topic by John Conde Apr 4 '12 at 11:31

Questions on Webmasters Stack Exchange are expected to relate to webmastering within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

You might be better off on the webapps stack exchange or stackoverflow. – toomanyairmiles Apr 4 '12 at 12:07