123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <html>
- <head>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
- </head>
- <style>
- table, th, td {
- border: 1px solid black;
- border-collapse: collapse;
- }</style>
- <p>Parameters</p>
- <form method="GET" action="../services/return_cpee.php">
- <input type="text" name="id" id="cbid" required>
- <input type="text" name="workerID" id="workerID" required>
- <input type="submit" value="Start Production" onclick="reloaded(rolle);">
- </form>
- <div id="cont"></div>
- <script type="text/javascript" src="form.js"></script>
- <script>
- var inhalt = "";
- $.ajax({
- url: '../callbacks/'+cbid+'.txt',
- async: false,
- success: function (data){
- inhalt = data;
- }
- });
- inhalt = JSON.parse(inhalt);
- var params = inhalt[1];
- var rolle = inhalt[1]['rolle'];
- var mytable = "<table cellpadding=\"0\" cellspacing=\"0\">";
- mytable += "<thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr>";
- Object.keys(params).forEach(val => {
- if (val != "form" && val != "rolle"){
- mytable += "<td>" + val + "</td>";
- mytable += "<td>" + params[val] + "</td></tr><tr>";}
- });
- mytable += "</tr></tbody></table>";
- var elem = document.getElementById("cont");
- elem.insertAdjacentHTML( 'beforeend', mytable );
- </script>
- </html>
|