OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Skia WebTry</title> | 4 <title>Skia WebTry</title> |
5 <meta charset='utf-8' /> | 5 <meta charset='utf-8' /> |
6 <link rel="stylesheet" href="/css/" type="text/css" media="screen"> | 6 <link rel="stylesheet" href="/css/" type="text/css" media="screen"> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 <section id=title> | 9 <section id=title> |
10 <a href="/">Home</a> | 10 <a href="/">Home</a> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 } | 70 } |
71 | 71 |
72 run.addEventListener('click', onSubmitCode); | 72 run.addEventListener('click', onSubmitCode); |
73 function onSubmitCode() { | 73 function onSubmitCode() { |
74 beginWait(); | 74 beginWait(); |
75 var req = new XMLHttpRequest(); | 75 var req = new XMLHttpRequest(); |
76 req.addEventListener('load', codeComplete); | 76 req.addEventListener('load', codeComplete); |
77 req.addEventListener('error', codeError); | 77 req.addEventListener('error', codeError); |
78 req.overrideMimeType('application/json'); | 78 req.overrideMimeType('application/json'); |
79 req.open('POST', '.', true); | 79 req.open('POST', '.', true); |
80 req.send(code.value); | 80 req.setRequestHeader('content-type', 'application/json'); |
| 81 req.send(JSON.stringify({"code": code.value})); |
81 } | 82 } |
82 </script> | 83 </script> |
83 </body> | 84 </body> |
84 </html> | 85 </html> |
OLD | NEW |