cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hank Heidt" <hhe...@dsbox.com>
Subject RE: Cocoon Forms - how to add a confirmation dialog on submit
Date Wed, 19 Jan 2005 16:33:44 GMT

I suspected that it would be something really easy!  Thanks for the help
and the additional insight into how widgets are handled.

-Hank

-----Original Message-----
From: Vilya Harvey [mailto:vilya.harvey@gmail.com] 
Sent: Wednesday, January 19, 2005 5:07 AM
To: users@cocoon.apache.org
Subject: Re: Cocoon Forms - how to add a confirmation dialog on submit

Hank Heidt wrote:

>Can any of you recommend a good way or point me to an example of how to
>add a confirmation dialog, i.e., "Are you sure that you want to save
the
>changes?" to the standard Cocoon Forms "submit" widget? 
>
>I looked around and didn't see anything obvious - my hope is that there
>is an easy way to do this...
>  
>
Try this:

    <ft:widget id="mySubmitWidget">
       <fi:styling onclick="return confirm('Are you sure you want to 
save your changes?')"/>
    </ft:widget>

Any attributes of the <fi:styling> element which aren't explicitly 
handled by the forms XSL are copied on to the output element for the 
widget. That includes all of the standard HTML event handler attributes,

so you can easily attach client-side JavaScript to your widgets.

Hope that helps,
Vil.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message