Hi, Raju. See if adding this to your Wicket component's constructor does
what you want:
add(new HeaderContributor(new IHeaderContributor() {
@Override
public void renderHead(IHeaderResponse response) {
response.renderOnDomReadyJavascript("alert('ready')");
}
}));
On Wed, Dec 7, 2011 at 8:25 PM, raju.ch <[email protected]> wrote:
> Hi,
> I want to add Javascript which loads Javascript client side variables when
> a page loads. It would call a Javascript function and pass in server-side
> values.I want to add something like this
>
>
>
> Please note that it is not part of the header. Any help would greatly
> appreciable.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/How-to-add-Javascript-function-in-wicket-1-4-Page-tp4171520p4171520.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>