WeBWorK Problems

javascript and html5 style problems

Re: javascript and html5 style problems

by Michael Gage -
Number of replies: 0
This sounds right to me.  Take a look at the Canvas object which is defined in the Applet API.  I wrote this a while ago at the beginning of the introduction of HTML5 and haven't had a chance to expand on it or clean it up.  

It was meant to present an API that looked pretty similar to the Java and Flash 
applet API, but as you observe the problem is actually simpler with HTML5. It will provide you with the tricks you need to preserve state in the javaScript applet and how to pass the result back to WeBWorK through ans_rule(s).  

I'm not sure what kind of data you are passing back to WeBWorK.  In the applets I wrote I passed the answer back in the same format that a student would use
to enter the answer.  If the answer is being passed back as TeX things could get
a bit trickier.

-- Mike

An example of HTML5 written by David Gage is at: