1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <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="text" name="quantity" id="quantity" required>
- <textarea rows="4" cols="50" name="comment" id="comment"></textarea>
- <input type="submit" value="Finisch 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>
|