Yes!
I haven't seen the sources for a while but i think we can
make use of the onclick parameter, i.e. allow users to define onclick. If
they do, we can
grab the content and transform it in the manner i mentioned previously (and
of course, remove
it from the tag)...
So, what im suggesting is instead of a 'specific' confirmationQuestion
parameter, to
make use of the more generic onclick.
On 5/21/07, Zsombor <[EMAIL PROTECTED]> wrote:
On 5/19/07, Andreas Andreou <[EMAIL PROTECTED]> wrote:
>
> better connect an event using dojo.event.connect to do such stuff -
> you'll have to then do a e.preventDefault() to prevent the click
> (instead of return false)
>
> For instance,
> dojo.event.connect(dojo.ById('link'), "onclick", function(e) { if
> (!confirm('Are you sure?') e,preventDefault(); } );
Oh, thanks!
Is there any objection against to put a 'confirmationQuestion' parameter
in the net.sf.tacos.ajax.components.AbstractSubmit class, and commit to
the tacos repo?
BR
Zsombor
On 5/18/07, Zsombor <[EMAIL PROTECTED]> wrote:
>
> >
> > Hi !
> >
> > How can I add confirmation function to an AjaxSubmit button in an
> > AjaxForm ? If I use
> > <input jwcid="@ tacos:AjaxSubmit" onclick="return confirm('Are you
> > sure?');" ...>
> > the confirmation popup comes up, but if I click on cancel, the form is
> > submitted. It's the same if I specify 'submitNormal="ognl:true"
> > If I try to use
> > <input jwcid="@Submit" onclick="return confirm('Are you sure?');"
> > ...>
> > then the situation is a little bit strange. At first, the popup comes
> > up, but no matter what am I clicking, it aborts the form post. At the second
> > time it works as expected. Is there any body who saw similar behaviour? Or
> > know a simple fix for it ?
> >
> >
> > BR,
> >
> > Zsombor
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Tacos-devel mailing list
> > Tacos-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/tacos
-devel<https://lists.sourceforge.net/lists/listinfo/tacos-devel>
> >
> >
>
>
> --
> Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Tacos-devel mailing list
Tacos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tacos-devel
--
Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Tacos-devel mailing list
Tacos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tacos-devel