[Seaside] jQuery cancel default action
Johan Brichau
johan at inceptive.be
Tue Aug 17 08:52:49 UTC 2010
My impression is that if you need do to a 'cancel default' all over the place (like I do), it's best to add your own onClick: method to the brush, like:
onClickWithCancel: aScript
self onClick: aScript,(JSStream on: 'return false')
And add that method as a class extension to your application package.
(just my 2 cents ;-)
Johan
On 17 Aug 2010, at 01:25, Julian Fitzell wrote:
> There was some tangential discussion of this on the -dev list at the
> end of May (relating to a bug in the ScriptGenerator code). I
> discussed further with Lukas offline, suggesting that we have some
> kind of method you could call to indicate "don't do any further
> processing" but I think he felt the different event propagation models
> in different browsers made this problematic...
>
> Julian
>
> On Mon, Aug 16, 2010 at 8:48 PM, Sean Allen <sean at monkeysnatchbanana.com> wrote:
>> If no one comes up with a good solution, you might want to take a look
>> at how Illiad handles that situation as it uses ajax for everything
>> but automatically degrades if js is off.
>>
>> On Mon, Aug 16, 2010 at 3:32 PM, Boris Popov, DeepCove Labs (SNN)
>> <boris at deepcovelabs.com> wrote:
>>> Is there a better (more elegant) way of cancelling default action of, say,
>>> an anchor when ajax is invoked? That is to support regular callback: when
>>> javascript is not available, but prevent page navigation when it is. At the
>>> moment I have,
>>>
>>> (html anchor)
>>> callback: [ ... ];
>>> onClick: (html jQuery ajax script: [:s | ... ]) , (html javascript return:
>>> false)
>>>
>>> Suggestions?
>>>
>>> -Boris (via BlackBerry)
>>>
>>> _______________________________________________
>>> seaside mailing list
>>> seaside at lists.squeakfoundation.org
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
More information about the seaside
mailing list