[Seaside] Handling redisplay/update stuff

Avi Bryant avi@beta4.com
Mon, 27 May 2002 20:20:46 -0700 (PDT)

On Mon, 27 May 2002, Tim Rowledge wrote:

> Not a very descriptive subject line I'm afraid.
> As everybody knows by now I'm trying to handle tests of multiple choice
> questions. I have a subpane to display the actual question and it gets
> told its question object each time the display mamba is done. This is
> causing a problem right now.
> Since my main activity is simply choosing from a list and hitting the
> 'this is my final answer and Im not the weakest link' button I'd like to
> avoid the redisplay that takes up time after hitting the button. There's
> no value in having it that I can think of for this case. Can I stop it
> from happening? Apart from anything else it triggers my
> answer-randomizer so suddenly the putative answers are in a different
> order to when you answered them, a little cognitively dissonant.

I'm not sure I'm entirely clear on what you're asking.  You want to submit
a form, but not have the browser reload anything?  The only way to do
that is with nasty javascript tricks involving the form submitting to a
hidden frame; trust me, you don't want to go there.

If you have a complex page and redrawing the whole thing is a problem, you
could split it up into a few html frames; only the frame with the actual
questions would have to reload.  That is, you could if Seaside had a frame
element; if you really need one, I can throw it together for you tomorrow.
But I hate framesets.

As for re-randomizing the answers, there should be lots of ways around
that - for example, do the randomization in the question's setter, and
only if you're given a different question from the current one.

Or maybe you want to go from the "here are the answers, pick one" page to
a "you picked b) and BZZT, you lose" page?  This would at least motivate
the necessary redisplay...