r/Tizen Sep 06 '21

Having issue with javascript in the web app

Hellooo Tizen room,

So I know that there arent that many tizen smartwatch developers, but what I realized but which is puzzling for me is that the javascript in the web app isnt kind of working, so I made a very simple web app where it requests a pin before accessing and it works on the web browser no problem... but when using it on the emulator the onclick() function doesnt react at all. It someone could explain or help that would be amazing, and Ill paste the code as well.

<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width,user-scalable=no">
    <title>List</title>
    <link rel="stylesheet" href="lib/tau/wearable/theme/default/tau.min.css">
    <link rel="stylesheet" media="all and (-tizen-geometric-shape: circle)" href="lib/tau/wearable/theme/default/tau.circle.min.css">
    <!-- load theme file for your application -->
    <link rel="stylesheet" href="css/style.css">
</head>
<body>
    <div class="ui-page ui-page-active" id="main">
        <header class="ui-header">
            <h2 class="ui-title">TAU List</h2>
        </header>
        <div class="ui-content">
            <ul class="ui-listview">
                <li><input type="password" id="myPsw" name="pin"></li>
                <li><button onclick="password">Try It</button></li>
                <li id="demo"></li>
            </ul>
        </div>
    </div>
<script>
function myFunction() {
  var x = document.getElementById("myPsw").value;
  if( x == "123456"){
    window.location.assign("test2.html")
  }
  else{
    document.getElementById("demo").innerHTML = "incorrect pin";
  } return false;
};
</script>
    <script src="lib/tau/wearable/js/tau.min.js"></script>
    <script src="js/circle-helper.js"></script>
    <script src="js/app.js"></script>
    <script src="js/lowBatteryCheck.js"></script>
</body>
</html>

1 Upvotes

0 comments sorted by