[Seaside] Anchor with submit and callback
Carl Gundel
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
>at http://localhost:8008/seaside/go/tests/allcanvastests
>where you select tab entitled "Submit"
>...
>The only difference I see is the order of the message sends,
>and I believe this is important so that the javascript created
>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. :-)
Thanks!
-Carl Gundel, author of Liberty BASIC
http://www.libertybasic.com
More information about the Seaside
mailing list