On 8/1/11 7:31 PM, Rob Beezer wrote:
OK, demo updated and everything seems to be working as intended now.
http://buzzard.ups.edu/misc/singlecell/singlecell-minimal.html
I changed the public API (which probably broke your demo). Here is a
new example. Note that now it's easy to change the text of the evaluate
button and hide the editor if you wish. Note that this doesn't disable
the editor (if they unhide the editor, they can still change things, for
example). But it does let you seamlessly embed interacts in webpages
with just a simple button to make the interact live.
Thanks,
Jason
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<meta name="viewport" content="width=device-width">
<title>Simple Compute Server</title>
<script type="text/javascript"
src="http://sagemath.org:5467/static/jquery-1.5.min.js"></script>
<script type="text/javascript"
src="http://sagemath.org:5467/embedded_singlecell.js"></script>
<script>
$(function() {
var makecells = function() {
singlecell.makeSinglecell({
inputDiv: '#mysingle',
hide: ['messages', 'computationID', 'files', 'sageMode', 'editor'],
evalButtonText: 'Make Live'
});
}
singlecell.init(makecells);
})</script>
</head>
<body>
<div id="mysingle"><script type="text/code">
@interact
def _(a=(1,10)):
print factorial(a)
</script></div>
</body>
</html>
--
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org