# List and onlclick

**URL:** <https://www.ruby-forum.com/t/list-and-onlclick/116687>\
**Category:** Rails\
**Created:** [October 8, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/list-and-onlclick/116687 "2007-10-08T19:10:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [October 8, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/list-and-onlclick/116687/1 "2007-10-08T19:10:40Z")

</div>

I have this link that when clicked becomes a dropdown. What I would like  
is to have it so that when a selection is ‘clicked’ on that dropdown  
turned backinto a link with the select thing as the link text. My idea  
was to use ‘onclick’ to call a method - something like this:

:onclick =\> {:action =\> ‘set\_exclude\_airline\_1’}

Everything compiles but it doesn’t work as expected. I guess my question  
is can I even do this? And does anyone have any sugestions on how to get  
this to work? Thanks,

-S
