| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <html>
- <body>
-
- <table>
- <tr><td>Result:</td></tr>
- <tr>
- <td>
- <iframe name="maincontent" id ="maincontent" width="800px" height="800px"></iframe>
- </td>
- <td>
- <p>
- <input type="submit" id="take" onclick="doTake()" value="1. Take Picture">
- </p>
- <p>
- <input type="submit" id="align" onclick="doAlign()" value="2. Align Image"><br>
- Takes up to 2 Minutes!
- </p>
- Digits and Analog recognition not yet implemented.
- <p>
- <input type="submit" id="digits" onclick="doDigits()" value="3a. Analyse Digits">
- </p>
- <p>
- <input type="submit" id="analog" onclick="doAnalog()" value="3b Analyse Analog">
- </p>
- </td>
- </tr>
- </table>
- <script type="text/javascript" src="./gethost.js"></script>
- <script type="text/javascript" src="./readconfig.js"></script>
-
- <script type="text/javascript">
- var basepath = "http://192.168.178.26";
- function doAnalog(){
- var xhttp = new XMLHttpRequest();
- url = basepath + "/editflow.html?task=test_analog";
- if (basepath.length > 0){
- url = url + "&host=" + basepath;
- }
- xhttp.open("GET", url, false);
- xhttp.send();
- var html = xhttp.responseText;
- html = html.replace("src=\"/", "src=\"" + basepath + "/");
- document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
- }
- function doDigits(){
- var xhttp = new XMLHttpRequest();
- url = basepath + "/editflow.html?task=test_digits";
- if (basepath.length > 0){
- url = url + "&host=" + basepath;
- }
- xhttp.open("GET", url, false);
- xhttp.send();
- var html = xhttp.responseText;
- html = html.replace("src=\"/", "src=\"" + basepath + "/");
- document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
- }
- function doAlign(){
- var xhttp = new XMLHttpRequest();
- url = basepath + "/editflow.html?task=test_align";
- if (basepath.length > 0){
- url = url + "&host=" + basepath;
- }
- xhttp.open("GET", url, false);
- xhttp.send();
- var html = xhttp.responseText;
- html = html.replace("src=\"/", "src=\"" + basepath + "/");
- document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
- document.getElementById("align").disabled = false;
- // document.getElementById("digits").disabled = false;
- // document.getElementById("analog").disabled = false;
- }
- function doTake(){
- var xhttp = new XMLHttpRequest();
- url = basepath + "/editflow.html?task=test_take";
- if (basepath.length > 0){
- url = url + "&host=" + basepath;
- }
- xhttp.open("GET", url, false);
- xhttp.send();
- var html = xhttp.responseText;
- document.getElementById("maincontent").src = 'data:text/html,' + encodeURIComponent(html);
- document.getElementById("align").disabled = false;
- document.getElementById("digits").disabled = true;
- document.getElementById("analog").disabled = true;
- }
- function Init(){
- basepath = getbasepath();
- document.getElementById("align").disabled = true;
- document.getElementById("digits").disabled = true;
- document.getElementById("analog").disabled = true;
- }
- Init();
-
- </script>
-
- </body>
- </html>
|