summaryrefslogtreecommitdiff
path: root/src/runtime/javascript/minibar/example.html
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2011-08-03 15:21:38 +0000
committerhallgren <hallgren@chalmers.se>2011-08-03 15:21:38 +0000
commitab8ec58e08d6766b5504a4116b8699ded17854bc (patch)
tree589fb1809ccfa784050dee5b2996a06f85764ff1 /src/runtime/javascript/minibar/example.html
parenta0ec59ccdad4507c7ff63317d8aad70394f927e5 (diff)
minibar: improve pgf_online.js
pgf_online.js has been simplified and generalized to support the full GF Web Service API. The changes are backwards incompatible, unfortunately. The documentation and minibar.js have been updated accordingly.
Diffstat (limited to 'src/runtime/javascript/minibar/example.html')
-rw-r--r--src/runtime/javascript/minibar/example.html22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/runtime/javascript/minibar/example.html b/src/runtime/javascript/minibar/example.html
index 55422987d..7d78a7ef6 100644
--- a/src/runtime/javascript/minibar/example.html
+++ b/src/runtime/javascript/minibar/example.html
@@ -1,21 +1,25 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<!DOCTYPE html>
<html> <head>
<title>PGF online server example</title>
<style type="text/css">
body { background: #ddd; }
+h1, h2, h3, small, th { font-family: sans-serif; }
+div.modtime { float: right; }
+.modtime { color: #666; white-space: nowrap; }
</style>
-<script type="text/JavaScript" src="http://www.grammaticalframework.org/src/runtime/javascript/minibar/support.js"></script>
-<script type="text/JavaScript" src="http://www.grammaticalframework.org/src/runtime/javascript/minibar/pgf_online.js"></script>
+<script type="text/JavaScript" src="support.js"></script>
+<script type="text/JavaScript" src="pgf_online.js"></script>
<script type="text/JavaScript">
var server_options={
grammars_url: "http://www.grammaticalframework.org/grammars/",
- grammar_list: ["Syllogism.pgf"]
+ grammar_list: ["Foods.pgf"]
}
var pgf_server = pgf_online(server_options);
function call_server() {
- pgf_server.parse("SyllogismEng",document.forms[0].input.value,show_output)
+ pgf_server.parse({from:"FoodsEng",input:document.forms[0].input.value},
+ show_output)
}
function show_output(parsed) {
@@ -31,7 +35,7 @@ function show_output(parsed) {
<form onsubmit="call_server(); return false">
Input:
-<input name=input size=50 value="some humans are not human">
+<input name=input size=50 value="this cheese is expensive">
<input type=submit value=Parse>
<p>
@@ -46,6 +50,8 @@ Output:
</ul>
<hr>
-<address></address>
-<!-- hhmts start --> Last modified: Mon Apr 11 14:53:21 CEST 2011 <!-- hhmts end -->
+<div class=modtime><small>
+<!-- hhmts start --> Last modified: Wed Aug 3 16:52:51 CEST 2011 <!-- hhmts end -->
+ </small></div>
+<address><a href="http://www.cse.chalmers.se/~hallgren/">TH</a></address>
</body> </html>