HTML Input Page

asked 2015-02-27 05:17:51 -0600

j0nr gravatar image

I am just starting to look at SageMath and I like it a lot.

I am wondering if it is possible to create a kind of app (I am using the cloud version). I know how to render html (%html or even %md) so I know I could create a nice looking form with some input boxes.

Is it then possible to "submit" the form and then have the input values passed to another worksheet which has all the calculations on it...then the results get posted back to the nice HTML "front GUI" page...mostly in the forms of plots?

I have a worksheet going that is full of code that create the necessary plots...the input variables are just set manually at the top, e.g.:

var1 = 1
var2 = 2

and so on. So I am wondering if I can link the html form input boxes on the front sheet to these vars, run the rest of the code on that worksheet, then present the results (plots) back on the front page?

Very similar to the way one would right HTML, submit it to a PHP file, which in turn would produce HTML results...

Thanks in advance!

edit retag flag offensive close merge delete

Comments

2

I don't know if there is a way to do this with HTML forms, but look at interacts in Sage. See http://wiki.sagemath.org/interact/ and http://www.sagemath.org/doc/reference...

John Palmieri gravatar imageJohn Palmieri ( 2015-02-27 11:04:57 -0600 )edit

Thanks for the links. I guess I am just asking as you can create nice little HTML segments (%html) and seems a shame that you can't link <input> boxes to vars...

j0nr gravatar imagej0nr ( 2015-02-28 03:08:15 -0600 )edit