[LON-CAPA-users] do not reset physlet on submission?
Guy Albertelli II
Wed, 26 Oct 2005 13:48:42 -0400 (EDT)
> Hopefully this is not OT for this list, but I have a loncapa / physlet
> question. We are using a lot of physlets inside our loncapa assignments to
> illustrate free body diagrams, animations, collisions, etc.
> Whenever a student submits an answer the physlet gets reset to its initial
> condition. Does anyone know of a way to keep the physlet from
There isn't any easy way, since pressing the submit button cause the
browser to get a new page from the server which causes the browser to
start the java applet up again. In order to stop this from occuring
you would need to either
1) stop the browser from submitting and requesting a new page that the
applet is in through either
a) frames / iframes
2) get the state of the physlet and send that to the server so that it
can when sending the new page out, have the page communicate to the
physlet what state it was in
1a. is the technically easiest one
1b. could be rather slick looking
2. requires support from both the hw problem to grab the state and
restore it, and from the physlet to be able to both advertise it's
state and be able to restore it.
> First positive (and easy) solution gets an Attaboy Award....
I guess I don't meet the easy requirement....