123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <html>
- <body>
- <script>
- function translateTypes() {
- val = document.getElementById("value");
- if(["if", "while", "assign", "call", "break", "continue", "return", "resolve", "access", "constant", "input", "output", "declare", "global", "Integer", "Float", "String", "Boolean", "Action", "Type"].indexOf(val.value) >= 0){
- alert("Rewriting complex!");
- val.value = "{\"value\":\"" + val.value + "\"}"
- }
- else {
- alert("No rewrite required");
- }
- return 1;
- }
- </script>
- <form action="http://localhost:8001/" method="POST" onsubmit="translateTypes()">
- <table border="1">
- <tr><td>
- Operation type:
- </td><td>
- <input type="radio" name="op" value="set_input"> Set input
- </td><td>
- <input type="radio" name="op" value="get_output"> Get output
- </td></tr>
- <tr><td>
- Username:
- </td><td>
- <input type="text" name="username">
- </td></tr>
- <tr><td>
- Message type:
- </td><td>
- <input type="radio" name="element_type" value="R"> Identifier
- </td><td>
- <input type="radio" name="element_type" value="V"> Value
- </td></tr>
- <tr><td>
- Value:
- </td><td>
- <input type="text" id="value" name="value">
- </td></tr>
- <tr><td>
- <input type="submit" value="send request">
- </td></tr>
- </form>
- </td></tr>
- </table>
- </body>
- </html>
|