1 Reply Latest reply on Feb 6, 2014 4:42 PM by Venkatasubbaiah Chenna

    SB1 doesn't appear to call callback in keyboard

    Bob Walker

      I've been working with the sb1 for a couple weeks now.  I've taken the price checker app and modified it to emulate some basic functionality we have in our 3x90 devices.  I've used the asl.keyboard in the price checker to enter quantity values vs. having an entry box and it works great.

       

      Now I wanted to implement a simple login. For my test I had some users in a local table I was going to search on when the user entered their ID.

       

      Login keyboard comes up, prompts the user for their ID and when the user presses enter the screen is blank.  The callback function which was supposed to get called to find the user and populate the profile information was not getting called.

       

      I stripped everything down until I had what I've included below.  I get the prompt, then keyboard and nothing on entry.

       

      I'll admit my js skills are outdated and I haven't worked in the web in some time.  It bothers me that this functioned great in the price checker but is killing me here.

       

      Any thoughts anyone?

       

       

       

       

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/html4/loose.dtd">
      <html lang="en">
      <head>
          <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
          <title>Authentication app - Login</title>
          <script type="text/javascript" src="../src/asl.js"></script>

          <script type="text/javascript">

              function getUserInfo() {
                  // popup the keyboard to get the users ID
        
         _alert("about to get user id");
                  asl.keyboard('number', function (id, returnValue) {
                      _alert(returnValue);
                  }, "", "Login with Emp ID", 8);

              }

          </script>

          <style type="text/css">
              body {
                  width: 320px;
                  height: 240px;
                  margin: 0;
                  padding: 0;
              }

          </style>
      </head>
      <body onload="getUserInfo();">
      </body>
      </html>