Hi Marieke,

some times ago I've solved a similar problem using JQuery and a plugin called jQuery AOP, but I don't know if exists a simpler solution. I used jQuery AOP with close button which is a standard anchor with class attribute set to 'w_close'. The following script will ask user to confirm before closing window without sending any data to server. I hope it could help you:


$('a.w_close').each(function(){
jQuery.aop.around( {target: this, method: 'onclick'},
                  function(invocation) {

                    if(confirm("Are you REALLY sure?")){
                        return invocation.proceed();
                    }else{
                        return false;
                    }
                  }
            );
});

bye.
Hello,

I want to aks the user if he is sure that he wants to close the
modalwindow.
Most of the time we use the modalwindow to edit a bean. But when closing
the modalwindow with close button, we are not sure if the user wants to
save the data or not.
Using 'setCloseButtonCallback' is not an option, because showing the
confirm-box should be just before going to server (or not if user doesn't
confirm).

Thanks for any help !
Kind Regards, Marieke Vandamme
**** DISCLAIMER ****

http://www.tvh.com/newen2/emaildisclaimer/default.html

"This message is delivered to all addressees subject to the conditions
set forth in the attached disclaimer, which is an integral part of this
message."



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

Reply via email to