[silva-dev] no "save_helper" in "mode_done"
paul at eurozope.org
Fri Jul 18 09:12:31 CEST 2003
On Friday, Jul 18, 2003, at 00:44 Europe/Paris, Martijn Faassen wrote:
> Clemens Robbenhaar wrote:
>> I do not know if anybody on this list has tried it, but my local
>> editors managed to get some error pages by _double_clicking_ on the
>> "save & exit" button.
>> The result an "AttributeError: save_helper", as the first submit
>> the current wierder in "mode_done", and the second one does not find
>> "save_helper" in this mode.
>> There is an easy fix for this: put an empty "save_helper.py"
>> in the "widgets" directory. This helps avoiding the error message;
>> however it looks somewhat strange for someone looking at the code.
>> Is there any interest of adding such "fallback" code to the Silve
>> code to avoid frustration of (very) non-technical users or is this
>> assumed to be bad defensive code hacking, and should be avoided?
> Well, it is definitely bad defensive code hacking... Why do browsers
> allow this in the first place, odd.
> do something about a doubleclick.
I think it makes sense to give JS a try. You can do two things:
a. Handle ondblclick and onclick with the same handler. That way
(hopefully) double click doesn't mean "run onclick twice".
b. That won't handle the case of two clicks, close together, but not
close enough for a double click. I propose for this that onclick
change the visual appearance of the button to disable and change the
meaning of the button to disable (remove the onclick hander).
Clemens, would this second model seem natural: you click and the button
immediately becomes "ghosted" ??
For these to work, you would need to change from a <form action> model
to a form with a button that handles the submit.
More information about the silva-dev