You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by balingen tame <eu...@gmail.com> on 2009/04/23 22:38:17 UTC

creating alink just for java script

I want to add  long java  script   to the onclick of a anchor , was
wondering if I do this using a Link , The reason  I want to use a link is I
can append the java script with the attribute modifier.My concern is , any
link will also adds   java script   to call the server , in this case I
want link to call just the java script and nothing more ,Can I do this ?

Re: creating alink just for java script

Posted by Jeremy Thomerson <je...@wickettraining.com>.
Use a WebMarkupContainer and either:

- add the AttributeModifier for the onclick
- or, override onComponentTag and do tag.put("onclick", javascript)

--
Jeremy Thomerson
http://www.wickettraining.com



On Thu, Apr 23, 2009 at 3:38 PM, balingen tame <eu...@gmail.com>wrote:

> I want to add  long java  script   to the onclick of a anchor , was
> wondering if I do this using a Link , The reason  I want to use a link is I
> can append the java script with the attribute modifier.My concern is , any
> link will also adds   java script   to call the server , in this case I
> want link to call just the java script and nothing more ,Can I do this ?
>