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="submit" value="Next" 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]['params'];
- params = JSON.parse(params);
- var rolle = inhalt[1]['rolle'];
- console.log(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 => {
- //console.log(val, params[val][0]);
- mytable += "<td>" + val + "</td>";
- mytable += "<td>" + params[val][0] + "</td></tr><tr>";
- });
- mytable += "</tr></tbody></table>";
- var elem = document.getElementById("cont");
- elem.insertAdjacentHTML( 'beforeend', mytable );
- </script>
- </html>
|