You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by vela <ve...@gmail.com> on 2009/03/25 11:51:11 UTC

Getting confirmation Javascript function value in wicket

Hello,

I have a  AjaxFallbackLink and on click of it, the application performs some
action. But the application should continue only based on the confirmation
dialog value of the java script. 

Lets say, the code is like this.

add(new AjaxFallbackLink("delete")
{
   public void onClick(AjaxRequestTarget target) 
   {
             target.appendJavascript("confirm('do you wanna to delete');");
             // how to find the confirm dialog value whether ok or cancel is
selected
             

  }
});

How to acheive this?
If there is any other way to achieve it,  please give an example.
-- 
View this message in context: http://www.nabble.com/Getting-confirmation-Javascript-function-value-in-wicket-tp22699158p22699158.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


Re: Getting confirmation Javascript function value in wicket

Posted by nino martinez wael <ni...@gmail.com>.
see this thread
http://www.nabble.com/AttributeModifier-in-AjaxLink%27s-onClick.--Possible--tp22697831p22698229.html

2009/3/25 vela <ve...@gmail.com>:
>
> Hello,
>
> I have a  AjaxFallbackLink and on click of it, the application performs some
> action. But the application should continue only based on the confirmation
> dialog value of the java script.
>
> Lets say, the code is like this.
>
> add(new AjaxFallbackLink("delete")
> {
>   public void onClick(AjaxRequestTarget target)
>   {
>             target.appendJavascript("confirm('do you wanna to delete');");
>             // how to find the confirm dialog value whether ok or cancel is
> selected
>
>
>  }
> });
>
> How to acheive this?
> If there is any other way to achieve it,  please give an example.
> --
> View this message in context: http://www.nabble.com/Getting-confirmation-Javascript-function-value-in-wicket-tp22699158p22699158.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
>
>

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