help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Re: Iliad: I must be misunderstanding some basic fo


From: Nicolas Petton
Subject: Re: [Help-smalltalk] Re: Iliad: I must be misunderstanding some basic form behaviour...
Date: Sat, 14 Nov 2009 12:08:39 +0100

Le samedi 14 novembre 2009 à 11:34 +0100, Stefan Schmiedl a écrit :
> Hi Bèrto,
> 
> On Sat, 14 Nov 2009 06:20:38 +0200
> Bèrto ëd Sèra <address@hidden> wrote:
> 
> > Got it... I'm not using a button to submit the form, but rather an
> > anchor. The reason i cannot use buttons is that we want button text to
> > be "localisable in place", so it needs to show a "localization status"
> > to authorized localizers (green, yellow, red ball for
> > localized/fuzzy/missing status) and a MouseOver on this ball opens the
> > localisation editor.
> > 
> > Only I cannot seem to understand how I can submit a form using an
> > anchor (a CSS button, that is)...
> > 
> 
> What I have in my current onlinetester:
> 
>         b := form radio 
>           beSubmitOnChange;
>           id: id;
>           name: group;
>           action: [ self postAnswer: i to: frage ].
> 
> 
> Looking into a fairly recent iliad source tree:
> 
> $ grep beSubmitOn .
> ./Core/XHTMLElements/FormElementElement.st:    beSubmitOnChange [
> ./Core/XHTMLElements/FormElementElement.st:   self beSubmitOnEvent: 'change'
> ./Core/XHTMLElements/FormElementElement.st:    beSubmitOnClick [
> ./Core/XHTMLElements/FormElementElement.st:   self beSubmitOnEvent: 'click'
> ./Core/XHTMLElements/FormElementElement.st:    beSubmitOnEvent: aString [
> ./More/Examples/TodoListGridWidget.st:                beSubmitOnClick;
> 
> So I guess that
> 
>   form a beSubmitOnClick; ...

Nop, it won't work, because an anchor is not a form element, so it will
send a GET request, and evaluate the action associated to the link, but
that's all.

And if you think about it, anchors do send requests on click :p :p

Nico

Attachment: signature.asc
Description: Ceci est une partie de message numériquement signée


reply via email to

[Prev in Thread] Current Thread [Next in Thread]