Ruby Forum Ruby on Rails > Link_to Tag, Onclick Event

Posted by Tushar Gandhi (tushar_gandhi)
on 19.08.2008 12:52
Hi,
I want to do like this :-
<a href ="#" onclick="return validate_pdf();">

using Link_to tag.
Where - validate() is an java script function in that RHTML file.

Is this is possible using link_to tag? If yes tell me hoe to do that?

Thanks & Regards,
Tushar
Posted by Frederick Cheung (Guest)
on 19.08.2008 12:55
(Received via mailing list)
On 19 Aug 2008, at 11:52, Tushar Gandhi wrote:

>
> Hi,
> I want to do like this :-
> <a href ="#" onclick="return validate_pdf();">
>
> using Link_to tag.
> Where - validate() is an java script function in that RHTML file.
>
> Is this is possible using link_to tag? If yes tell me hoe to do that?

link_to_function will do that.

Fred