Just developing a user interface for robot control on a windows machine.
I'm using TABs from JQueryUI. For that I created a index.html containing the widget header with 3 TABS
- inndex.html (contains js)
- TAB0 is loaded from a static file called Panel.html (nearly empty)
- TAB2 is loaded from a static file called Map.html (nearly empty)
- TAB1 is loaded from a static file called Alarmlist.html (contains js)
Alarmlist has a button acknowledge and I defined a reaction to the browser console.
The key works proper after a new call of the index.html
after a TAB Change from TAB1 to TAB0 and back the key doesn't work at all, no output to the console!
herewith my sites
- index.html
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>Robot user interface</title>
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
- <meta name="description" content="Robot user interface" />
- <meta name="author" content="Wolfgang Glück" />
- <meta name="editor" content="html-editor phase 5" />
- <link rel="icon" href="/static/icons/favicon-16x16.png" type="image/png">
- </head>
-
- <body>
- <div class="ui-widget">
- <div id="tabs"
- class="ui-widget-header
- ui-corner-top">
-
- <ul>
- <li><a href="Panel.html"> Panel</a></li>
- <li><a href="Alarmlist.html"> Alarm list</a></li>
- <li><a href="Map.html"> Map</a></li>
- </ul>
- </div>
- </div>
-
- <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/blitzer/jquery-ui.css">
- <script src="../static/js/jquery-1.12.0.min.js" type="text/javascript"></script>
- <script src="../static/js/jquery-ui.min.js" type="text/javascript"></script>
- <script src="../static/js/AlarmlistScripts.js" type="text/javascript"></script>
- <script type="text/javascript">
- $(document).ready(function(){
- $('#tabs').tabs({active: 1});
- });
- </script>
-
- </body>
- </html>
-TAB1 Alarmlist
AlarmlistScripts
- $(document).ready(function(){
- $('#acknowledge').button()
- .click(function(event) {
- console.log("acknowledge geclickt.");
- });
- $('#button2').click(function() { window.location.href = "/Robbi/2"; });
- $('#button3').click(function() { window.location.href = "/Robbi/3"; });
- $('#button4').click(function() { window.location.href = "/Robbi/4"; });
- $('#button5').click(function() { window.location.href = "/Robbi/5"; });
- });
What did I wrong?
Thanks for your support