Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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 />
    </form>

which uses this javascript:

<script>
/*
Auto tabbing script- By JavaScriptKit.com
http://www.javascriptkit.com
This credit MUST stay intact for use
*/
function autotab(original,destination){
if (original.getAttribute&&original.value.length==original.getAttribute("maxlength"))
destination.focus()
}
</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";
  }
  else
  if(document.postcode.operation[1].checked == true)
  {
    document.postcode.action ="plans_gas.php";
  }
  else
  if(document.postcode.operation[2].checked == true)
  {
    document.postcode.action ="plans_duel.php";
  }

  return true;
}
</script>

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
    
You might be better off on the webapps stack exchange or stackoverflow. –  toomanyairmiles Apr 4 '12 at 12:07
add comment

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.

Browse other questions tagged or ask your own question.