Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 36 lines (32 sloc) 1.153 kb
e227339 @filonenko-mikhail initial commit
authored
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset='utf-8'" />
4
5 <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script>
6 <script type="text/javascript" src="https://raw.github.com/datagraph/jquery-jsonrpc/master/jquery.jsonrpc.js"></script>
7
8 <title>Maxima json rpc example</title>
9
10 <script type="text/javascript">
11 $(document).ready(function() {
12 $.jsonRPC.setup({
13 endPoint: '/jsonrpc',
14 namespace: ''
15 });
16 $("input#evaluate").click(function() {
17 $.jsonRPC.request('evaluate', {
18 params: [$("textarea#input").val()],
19 success: function(data) {
20 $("<p />").text(data.result).appendTo($("p#result"));
21 },
22 error: function(data) {
23 $("<p />").text(data.error.message).appendTo($("p#result"));
24 }
25 });
26 });
27 });
28 </script>
29 </head>
30 <body>
31 <p id="result"></p>
32 <p><textarea name="input" id="input"></textarea></p>
33 <p><input name="evaluate" id="evaluate" value="evaluate" type="button"/></p>
34 </body>
35 </html>
Something went wrong with that request. Please try again.