# Radio\_button with onclick option

**URL:** <https://www.ruby-forum.com/t/radio-button-with-onclick-option/148472>\
**Category:** Ruby\
**Created:** [September 13, 2008, 6:32am UTC](https://www.ruby-forum.com/t/radio-button-with-onclick-option/148472 "2008-09-13T06:32:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ganeshk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7cd45c/32.png) [@ganeshk](https://www.ruby-forum.com/u/ganeshk)\
**Post date:** [September 13, 2008, 6:32am UTC](https://www.ruby-forum.com/t/radio-button-with-onclick-option/148472/1 "2008-09-13T06:32:19Z")

</div>

Hi i want to know to how to call contoller function when onclick occures  
for radio button

i have used the syntax below but it is throwing error plz reply if there  
is any solution

```
  <%= radio_button_tag "student", "report", false,
            options = {:id=>'student_report', :onclick

```

=\>“javascript:$(‘report’).action= /user/lp\_report” }%\>

$(‘report’)=\> it is the form id
