[ 
https://issues.apache.org/jira/browse/TAPESTRY-2251?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul Stanton updated TAPESTRY-2251:
-----------------------------------

    Attachment: ButtonLinkRenderer2.java

java class

> ButtonLinkRenderer overwrites onclick event handler
> ---------------------------------------------------
>
>                 Key: TAPESTRY-2251
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2251
>             Project: Tapestry
>          Issue Type: Improvement
>          Components: Contrib
>    Affects Versions: 4.1.5
>            Reporter: Paul Stanton
>            Priority: Minor
>         Attachments: ButtonLinkRenderer2.java
>
>
> i've started using the buttonlinkrenderer and have noticed that a neat trick 
> i use with direct link does not work with buttonlinkrenderer.
> to have the user confirm their action before submitting a request, i add an 
> onclick event hander ie: onclick="return confirm('sure?');" this would be 
> called before the actual direct link href was called, and returning false 
> would cancel the request altogether.
> as buttonlinkrenderer utilises the onclick attribute of the button, this 
> trick is not available with a buttonlinkrenderer.
> is it possible to have buttonlinkrenderer append to any existing onclick 
> handler? so instead of:
> onclick="window.location='/.....'"
> can it render:
> onclick="myscript;window.location='/.....'" where myscript is my onclick 
> hander.
> thx. paul.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to