# Rails: Transmit \<select\>\<option\> value into link\_to()

**URL:** <https://www.ruby-forum.com/t/rails-transmit-select-option-value-into-link-to/68808>\
**Category:** Ruby\
**Created:** [September 15, 2006, 4:00pm UTC](https://www.ruby-forum.com/t/rails-transmit-select-option-value-into-link-to/68808 "2006-09-15T16:00:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [September 15, 2006, 4:00pm UTC](https://www.ruby-forum.com/t/rails-transmit-select-option-value-into-link-to/68808/1 "2006-09-15T16:00:32Z")

</div>

[Still trying to safely get on the Rails mailing list…]

Rubies:

The great thing about Web programming is there’s so many languages to  
chose  
from - or mix together.

Specifically, an ERb page can contain 3 languages:

\<% for record in @table %\> \<%= h(record.name) %\> \<% end %\>

Okay, that’s a combobox with names and values in it.

Now how do I let the user select one option, and send it to the next  
page  
with link\_to()?

\<%= link\_to ‘Go to Next Page’,  
{:action =\> ‘goToNextPage’, :id =\> ??? }  
%\>

The third potential language is JavaScript, so in theory I could add an  
onclick event to each , or similar, then express the link\_to in  
raw  
HTML…

[Go to Next Page](https://www.ruby-forum.com/page/goToNextPage/2)

…then use the onclick event to change the href attribute.

However, that’s not very Railish, and I’m sure there’s some feature  
available which my newbescence has overlooked!

---

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [September 15, 2006, 5:19pm UTC](https://www.ruby-forum.com/t/rails-transmit-select-option-value-into-link-to/68808/2 "2006-09-15T17:19:27Z")

</div>

Phlip wrote:

> [Still trying to safely get on the Rails mailing list…]

Do you mean to say you meant this to go there? It… didn’t.

> The great thing about Web programming is there’s so many languages to  
> chose  
> from - or mix together.

Not to be mean, but… Isn’t that true about all programming?  
Especially with the .NET CLR and it’s ability to interoperate between  
languages easily. I see this as being huge eventually. (Ruby has a gem  
that allows you to use .NET libraries, and of course C libraries… So  
it’s already walking down this path. And I’m very much looking forward  
to [Ruby.NET](http://Ruby.NET).)

---

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [September 15, 2006, 6:40pm UTC](https://www.ruby-forum.com/t/rails-transmit-select-option-value-into-link-to/68808/3 "2006-09-15T18:40:59Z")

</div>

William C. wrote:

> > [Still trying to safely get on the Rails mailing list…]
> 
> Do you mean to say you meant this to go there? It… didn’t.

I didn’t say that.

I mean when I tried to register before nothing happened, and when I try  
to  
register today I get this:

[http://lists.rubyonrails.org/mailman/subscribe/rails](http://lists.rubyonrails.org/mailman/subscribe/rails)

blah blah blah

IOError: [Errno 28] No space left on device

I’m tormented with the urge to blame Python, but the problem is  
apparently  
the drive filled up with mail!

---

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [September 15, 2006, 8:27pm UTC](https://www.ruby-forum.com/t/rails-transmit-select-option-value-into-link-to/68808/4 "2006-09-15T20:27:09Z")

</div>

On 9/15/06, Phlip [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I mean when I tried to register before nothing happened, and when I try to  
> register today I get this:
> 
> [http://lists.rubyonrails.org/mailman/subscribe/rails](http://lists.rubyonrails.org/mailman/subscribe/rails)

The Rails mailing list is no longer there. It’s a Google Group, now.

-austin

---

<div class="post-metadata">

**Author:** ![Phlip](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/ed8c4c/32.png) [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Post date:** [September 15, 2006, 8:31pm UTC](https://www.ruby-forum.com/t/rails-transmit-select-option-value-into-link-to/68808/5 "2006-09-15T20:31:09Z")

</div>

Austin Z. wrote:

> > [http://lists.rubyonrails.org/mailman/subscribe/rails](http://lists.rubyonrails.org/mailman/subscribe/rails)
> 
> The Rails mailing list is no longer there. It’s a Google Group, now.

Yay! Could someone tell us on that page?!
