Can I tab between input fields within a my web application form?

Version 1

    Verified Product Versions

    CETerm 5.7

    Tabbing behavior is managed differently for devices based on Windows CE as opposed to Windows Mobile OS platforms. For Windows CE platform devices, you can just hook the event handlers and manage the focus. You can find the current focus using the document.activeElement object.


    It is more difficult to manage tabbing under Windows Mobile OS platform devices because the native text input element does not support many events.


    This following sample tracks focus with a variable. You can trick it by using the stylus to set focus, but repeated presses of ENTER will still cycle focus through the elements. You can use any key other then ENTER to achieve the same behavior.


    Right click and select "Save Target As..." to download this sample tabPPC3.htm.


    To run, you can simply copy it to the root folder on your device and configure a Browser session in CETerm to open this file. Set the Connection -> Host Address to file:///tabPPC3.htm




    <title>Naurtech Tab Demo Page</title>

    <meta http-equiv="Scanner" content="Enabled">

    <meta http-equiv="OnKey_RETURN" content="Javascript:advancefocus();">


    <body scroll=no onload="Javascript:myclear();">

    <object id="CETerm" classid="clsid:D14943BD-4900-453E-8582-725F21A57E0C" height=0, width=0>


    <form name=form1>


    <font size=+2>

    Naurtech Tab Demo<br>



    Focus starts in first input<br>

    <input type=text id="scan1" name="scan1" value="" size=30><br>

    <input type=text id="scan2" name="scan2" value="" size=30><br>

    <input type=text id="scan3" name="scan3" value="" size=30><br>

    <input type=button name="clear" value="Clear Data" onclick="myclear();">



    <script language=javascript>

    var current = 0;


    // Advance focus

    function advancefocus()


        if (current == 1)



            current = 2;


        else if (current == 2)



            current = 3;





            current = 1;





    // Clear the fields

    function myclear()


        document.form1.scan1.value = "";

        document.form1.scan2.value = "";

        document.form1.scan3.value = "";




        current = 1;



    // Play a sound

    function ring()


        CETerm.PlaySound( "Infbeg.wav" );