Should now run programs in the browser, just need to compile the examples and load them up

This commit is contained in:
Dale Weiler 2012-11-13 04:04:31 +00:00
parent 4f4ef893f4
commit ef80c6da7e
2 changed files with 6 additions and 7 deletions

View file

@ -189,14 +189,12 @@ function update() {
doc.value = examples[sel[sel.selectedIndex].value - 1];
}
function compile() {
//run ([
// document.getElementById("eg").selectedIndex.toString(),
// document.getElementById("args")
//]);
//document.write("Hello World\n");
run (["hello.dat"]);
var args = [
'dat/' + document.getElementById("eg").selectedIndex.toString() + '.dat'
].concat(document.getElementById("args").value.split());
document.getElementById("output").value = "Executing " + args.toString().replace(',', ' ');
run (args);
}
/* set initial */

View file

@ -48,6 +48,7 @@
<textarea id="input" rows="25" cols="100%" disabled="disabled"></textarea>
<br>
<button onclick="compile()">Execute</button>
<textarea id="args">Test</textarea>
<h4>Execution Output:</h4>
<textarea id="output" rows="25", cols="100%"></textarea>
</section>