Buttons don't work after submit or clicking link
Hi Forum,
i have a problem, i use the code attached.
After i load the page the buttons for power, plus and minus are working as expected, but after
i submitted the form or i clicked one of the "a href" buttons the power, plus and minus buttons
are not working anymore.
Can anyone help me to solve this issue ?!
Thanks in advance !!!
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="apple-mobile-web-app-capable" content="yes" />
- <meta name="apple-mobile-web-app-status-bar-style" content="black" />
-
- <title>LED-Control 2.0</title>
- <meta name="mobile-web-app-capable" content="yes">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="apple-touch-startup-image" href="http://192.168.2.1/LED/iphone.png">
- <link rel="apple-touch-icon" href="http://192.168.2.1/LED/custom-icon.png">
- <link rel="shortcut icon" href="http://192.168.2.1/LED/custom-icon.png">
- <link rel="stylesheet" href="http://127.0.0.1/jquery/jquery.mobile-1.4.5.min.css">
- <script src="http://127.0.0.1/jquery/jquery-1.11.3.min.js"></script>
- <script src="http://127.0.0.1/jquery/jquery.mobile-1.4.5.min.js"></script>
-
- <script type="text/javascript">
- $(function () {
- $("#btnQueryString0").bind("click", function () {
- var url = "?red=0&green=0&blue=0&dimv=0";
- window.location.href = url;
- });
-
- $("#btnQueryString1").bind("click", function () {
- var url = "?red=0&green=0&blue=0&dimv=10";
- window.location.href = url;
- });
-
- $("#btnQueryString2").bind("click", function () {
- var url = "?red=0&green=0&blue=0&dimv=-10";
- window.location.href = url;
- });
- });
- </script>
-
-
-
- </head>
- <body>
-
- <div data-role="page" id="seite01">
- <div data-role="header">
-
- <h1>LED-Control</h1>
- </div>
-
-
- <div data-role="content">
-
- <p>
- <center>
- <div data-role="controlgroup" data-type="horizontal" >
-
- <input type="button" id="btnQueryString0" data-icon="power" data-iconpos="notext" value="Icon only">
- <input type="button" id="btnQueryString1" data-icon="plus" data-iconpos="notext" value="Icon only" >
- <input type="button" id="btnQueryString2" data-icon="minus" data-iconpos="notext" value="Icon only">
-
- </div>
- </center>
- </p>
-
-
-
- <p>
- <center>
- <div data-role="controlgroup" data-type="horizontal">
- <a href="?red=255&green=0&blue=0&dimv=0" data-role="button" class="ui-btn ui-corner-all ui-btn-inline" style="background: red; color: red;"> </a>
- <a href="?red=0&green=255&blue=255&dimv=0" data-role="button" class="ui-btn ui-corner-all ui-btn-inline" style="background: green; color: green;"> </a>
- <a href="?red=0&green=0&blue=255&dimv=0" data-role="button" class="ui-btn ui-corner-all ui-btn-inline" style="background: blue; color: blue;"> </a>
- </div>
- </center>
- </p>
-
-
- <p>
- <center>
- <div data-role="controlgroup" data-type="horizontal">
- <a href="?red=255&green=20&blue=0&dimv=0" data-role="button" class="ui-btn ui-corner-all ui-btn-inline" style="background: rgb(255,150,0); color: red;"> </a>
- <a href="?red=0&green=150&blue=255&dimv=0" data-role="button" class="ui-btn ui-corner-all ui-btn-inline" style="background: rgb(0,190,255); color: green;"> </a>
- <a href="?red=255&green=255&blue=255&dimv=0" data-role="button" class="ui-btn ui-corner-all ui-btn-inline" style="background: rgb(255,255,255); color: blue;"> </a>
- </div>
- </center>
- </p>
-
-
-
- <p>
-
-
- <form name="input" action="index.htm" method="get">
-
- <label for="slider-2">RED:</label>
- <input type="range" name="red" id="slider-2" data-highlight="true" min="0" max="255" value="$r" ><br>
- <label for="slider-2">GREEN:</label>
- <input type="range" name="green" id="slider-2" data-highlight="true" min="0" max="255" value="$g"><br>
- <label for="slider-2">BLUE:</label>
- <input type="range" name="blue" id="slider-2" data-highlight="true" min="0" max="255" value="$b" ><br>
- <input type="hidden" name="dimv" value="0">
- <button class="ui-shadow ui-btn ui-corner-all" type="submit" value="SET" id="submit-2">SET</button>
-
- </form>
-
- </p>
-
-
- </div><!-- /content -->
- <div data-role="footer">
-
- <h4>V 1.0</h4>
- </div><!-- /footer -->
- </div><!-- /page -->
-
-
- <!-- </body> --></body>
- </html>