You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by João Pereira <jo...@gmail.com> on 2009/04/23 01:48:40 UTC

adding javascript to response

Hi,

I'm new here to wicket.

I'm trying to add a javascrip code to the response after processing a form.

public void onSubmit() {
            //do something
           //add javascript code in the response to be processed by the
browse?

        }

What the best aproach to achieve this?

Re: adding javascript to response

Posted by "Mathias P.W Nilsson" <ma...@snyltarna.se>.
If you have an AjaxSubmitLink you can do the following

public void onSubmit( AjaxRequestTarget target, Form form ){
   target.appendJavascript( "alert( 'hi!' );" );
}
-- 
View this message in context: http://www.nabble.com/adding-javascript-to-response-tp23187923p23197512.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