Commit fcac8a6f authored by Pietro Abate's avatar Pietro Abate

[r2004-12-28 00:57:04 by afrisch] Demo

Original author: afrisch
Date: 2004-12-28 01:00:14+00:00
parent 445608a3
......@@ -336,12 +336,13 @@ web/site.cdo: cduce web/xhtml.cdo web/site.cd
web/xhtml.cdo: cduce web/xhtml.cd
./cduce -I web/ --compile web/xhtml.cd
website: webpages webiface
website: webpages webiface evaluator
install_web: website
cp web/www/*.html web/cduce.css $(HTML_DIR)/
cp web/www/*.html web/demo.js web/cduce.css $(HTML_DIR)/
cp CHANGES INSTALL INSTALL.WIN32 $(HTML_DIR)/
cp webiface $(CGI_DIR)/cduce
cp evaluator $(CGI_DIR)/
if test ! -d "$(HTML_DIR)/img" ; then \
mkdir $(HTML_DIR)/img; \
fi;
......
......@@ -10,6 +10,7 @@
<input type="submit" value="Evaluate" onclick="submit('a');"/>
<input type="button" value="Clear" onclick="clearreq('a');"/>
<textarea id="areq" cols="80" rows="25">
let x = 1;;
</textarea>
<br/>
</td>
......@@ -19,7 +20,7 @@
</td>
</tr>
</td>
<script>
<script type="javascript">
function clearreq(pr)
{ document.getElementById(pr+"req").value = ""; }
......
function clearreq(pr)
{ document.getElementById(pr+"req").value = ""; }
function show_result(pr,res)
{ document.getElementById(pr+"res").innerHTML = res; }
function submit(pr) {
var xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST", "/cgi-bin/evaluator" ,true);
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) { show_result(pr,xmlhttp.responseText); }
}
show_result(pr,"Computing...");
xmlhttp.send(document.getElementById(pr+"req").value);
}
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<page name="demo">
<title>CDuce demo</title>
<box title="Demo" link="demo">
<two-columns>
<left>
<xhtml>
<input type="submit" value="Evaluate" onclick="submit('a');"/>
<input type="button" value="Clear" onclick="clearreq('a');"/>
<textarea id="areq" cols="80" rows="25">
let x = 1;;
</textarea>
<br/>
</xhtml>
</left>
<right>
<xhtml>
<input type="button" value="Clear" onclick="show_result('a','');"/>
<div id="ares"></div>
<script src="demo.js" type="text/javascript"/>
</xhtml>
</right>
</two-columns>
</box>
</page>
......@@ -14,7 +14,9 @@
<pages-toc/>
</left>
<external href="http://reglisse.ens.fr/cgi-bin/cduce" title="Online demo" name="proto"/>
<external href="http://reglisse.ens.fr/cgi-bin/cduce" title="Online
demo" name="proto"/>
<include file="demo.xml"/>
<include file="download.xml"/>
<include file="bench.xml"/>
<include file="papers.xml"/>
......
......@@ -53,6 +53,7 @@ type Content =
| <two-columns>[ <left>Content <right>Content ]
| <note title=?String> Content
| <footnotes>[]
| <xhtml>H:Flow
| InlineText
)* ]
......@@ -380,6 +381,7 @@ match page with
(match !footnotes with
| [] -> []
| n -> footnotes := []; [ <br>[] (meta n) ] )
| <xhtml>i -> i
| t -> text [ t ]
in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment