You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Gunnar Eketrapp <gu...@gmail.com> on 2009/11/20 08:15:47 UTC
ActionLink + JCalling JavaScropt
Hi!
I would like to call a javascript method when an action link is clicked.
Can that be done?
I.e. is there any way to addd som javascript to a actionlink,
Thanks in advance,
Gunnar Eketrapp
Re: ActionLink + JCalling JavaScropt
Posted by Gunnar Eketrapp <gu...@gmail.com>.
Thanks!
Sorry for asking stupid questions. It was as simple as adding
onclick="mehodName();"
What I needed to do was to hide a dive via a js method + updating the conent
of the zone
via the actionlink.
I thought (before testing which is big NO NO) that I should brake the
functionality of the
actionlink by doing so which was a wrong assumption.
I am relatively new to javascript and this new design I have got from the
HTML / Flash guys
excels in javascript and sliding div's.
I also just started to learn this ajax zone support in T5 which is great for
updating the content of
those divs.
Anyway thanks a lot for the answers.
/Gunnar
2009/11/20 Kalle Korhonen <ka...@gmail.com>
> Define When.
>
> Before? Use onclick.
> After (from server-side)? Use renderSupport.addScript("myfunction();")
>
> Search the mailing archives, numerous examples.
>
> Kalle
>
>
> On Thu, Nov 19, 2009 at 11:15 PM, Gunnar Eketrapp
> <gu...@gmail.com> wrote:
> > Hi!
> >
> > I would like to call a javascript method when an action link is clicked.
> >
> > Can that be done?
> >
> > I.e. is there any way to addd som javascript to a actionlink,
> >
> > Thanks in advance,
> > Gunnar Eketrapp
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
[Hem: 08-715 59 57, Mobil: 0708-52 62 90]
Allévägen 2A, 132 42 Saltsjö-Boo
Re: ActionLink + JCalling JavaScropt
Posted by Kalle Korhonen <ka...@gmail.com>.
Define When.
Before? Use onclick.
After (from server-side)? Use renderSupport.addScript("myfunction();")
Search the mailing archives, numerous examples.
Kalle
On Thu, Nov 19, 2009 at 11:15 PM, Gunnar Eketrapp
<gu...@gmail.com> wrote:
> Hi!
>
> I would like to call a javascript method when an action link is clicked.
>
> Can that be done?
>
> I.e. is there any way to addd som javascript to a actionlink,
>
> Thanks in advance,
> Gunnar Eketrapp
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: ActionLink + JCalling JavaScropt
Posted by Mario Udina <m....@gmail.com>.
On Fri, Nov 20, 2009 at 8:15 AM, Gunnar Eketrapp
<gu...@gmail.com>wrote:
> Hi!
>
> I would like to call a javascript method when an action link is clicked.
>
> Can that be done?
>
> I.e. is there any way to addd som javascript to a actionlink,
>
> Thanks in advance,
> Gunnar Eketrapp
>
I use the following code for a popup box from an event link:
<a t:type="eventLink" t:event="removePendingPath" href="Details"
class="actionLink" onclick="return
self.confirm('${message:confirm-remove-apath}')">
it should work even for an actionLink!
regards,
mario