Files
gf-core/src/www/minibar/example.html
hallgren 3eaeaed8fd GF cloud: move support.js and pgf_online.js
Created the folder js and moved minibar/support.js and minibar/pgf_online.js
there, to emphasize their status as app independent support libraries.

There are probably more files that should be moved here.

The cloud apps have been updated, externally hosted apps that link directly
to our server need to be updated too.
2012-11-20 12:56:48 +00:00

58 lines
1.4 KiB
HTML

<!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="../js/support.js"></script>
<script type="text/JavaScript" src="../js/pgf_online.js"></script>
<script type="text/JavaScript">
var server_options={
grammars_url: "http://www.grammaticalframework.org/grammars/",
grammar_list: ["Foods.pgf"]
}
var pgf_server = pgf_online(server_options);
function call_server() {
pgf_server.parse({from:"FoodsEng",input:document.forms[0].input.value},
show_output)
}
function show_output(parsed) {
document.getElementById("output").innerHTML=parsed[0].trees[0]
}
</script>
</head>
<body>
<h1>PGF online server example</h1>
<form onsubmit="call_server(); return false">
Input:
<input name=input size=50 value="this cheese is expensive">
<input type=submit value=Parse>
<p>
Output:
<span id=output></span>
</form>
<h2>Documentation</h2>
<ul>
<li><a href="gf-web-api-examples.html">GF Web API examples</a>
</ul>
<hr>
<div class=modtime><small>
<!-- hhmts start -->Last modified: Tue Nov 20 13:42:21 CET 2012 <!-- hhmts end -->
</small></div>
<address><a href="http://www.cse.chalmers.se/~hallgren/">TH</a></address>
</body> </html>