[Seaside] Degrading Remove Button
renggli at gmail.com
Fri Oct 2 16:56:29 UTC 2009
Try something along:
onClick: (html scriptaculous request
callback: [ self removeItem ];
confirm: 'Are you sure to remove Foo?';
callback: [ (self confirm: 'Are you sure to remove?') ifTrue: [
self removeItem ] ];
2009/10/2 Joel Turnbull <joel.turnbull at ardishealth.com>:
> I have a remove button that I'd like to pop a js confirmation dialog.
> I'd like the button to degrade so that if js is disabled, the user will be
> taken to a separate confirmation page, ala the WAComponent confirm:
> Here's the closest I've gotten
> html submitButton
> onClick: 'return confirm(''Are you sure you wish to remove', aFoo
> callback: [ self confirm: 'Are you sure you wish to remove', aFoo name,'?'
> with: each value
> The problem with that is, the result of the js confirmation returning true
> is the callback, which is another confirmation.
> It seems like I need a separate callback to handle the result of the js
> confim. Is that doable? Any other ideas?
> I played around with the WAAsyncComponent onClickCallback: but that didn't
> seem to do what I expected.
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside