[Seaside] Anchor with submit and callback
carlg at libertybasic.com
Fri Nov 17 20:39:53 UTC 2006
>Carl Gundel a écrit :
>> When I use the code below the anchor submits, but it doesn't execute the
>> callback. If I eliminate the submitFormNamed: then clicking executes the
>> callback, but of course then it doesn't submit the form. Is it possible
>> to have an anchor that does both?
>This is very strange because WACanvasLinkSubmitTest is doing
>exactly what you are trying to accomplish. This can be seen
>where you select tab entitled "Submit"
>The only difference I see is the order of the message sends,
>by #handlerForForm: also includes the callback key that has
>been created earlier by the #callback: message
> html anchor
> id: #increaseLink;
> addShortcut: 'Ctrl-Up';
> callback: [count := count + 1];
> submitFormNamed: formId;
> text: '++'.
Wow, that does seem to fix the problem. Amazing. I've got to make sure I
write this down. :-)
-Carl Gundel, author of Liberty BASIC
More information about the Seaside