You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by HHB <hu...@yahoo.ca> on 2009/05/05 15:10:48 UTC

How to append JavaScript to a link?

Hey,
The last cell in a data table is a link (that is contained in a form) that will
delete the row.
How to append JavaScript code that will display a confirmation dialog?
Thanks for help and time.


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


Re: How to append JavaScript to a link?

Posted by Linda van der Pal <lv...@heritageagenturen.nl>.
deleteButton.add(new SimpleAttributeModifier("onclick", "return 
confirm('Are you sure?');"));

HHB wrote:
> Hey,
> The last cell in a data table is a link (that is contained in a form) that will
> delete the row.
> How to append JavaScript code that will display a confirmation dialog?
> Thanks for help and time.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>   
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.325 / Virus Database: 270.12.18/2096 - Release Date: 05/04/09 17:51:00
>
>   


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


Re: How to append JavaScript to a link?

Posted by jensiator <je...@megasol.se>.
I would not use javascript direct.  Use wickets Ajax components instead. 
I would use a AjaxLink and a wicket Modal Window. The modal window would
then contain the message
and Ok and Cancel button. 


Jens 




HHB wrote:
> 
> Hey,
> The last cell in a data table is a link (that is contained in a form) that
> will
> delete the row.
> How to append JavaScript code that will display a confirmation dialog?
> Thanks for help and time.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-append-JavaScript-to-a-link--tp23387242p23387452.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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