[Rails] Re: How to get select_tag value in controller?

2008-12-31 Thread Zhao Yi
zero0x wrote: I suppose you're using prototype, so you just need to get the value of the select box. $(id-of-the-element).getValue() On 28. Dec., 15:04 h., Zhao Yi rails-mailing-l...@andreas-s.net How can I send more than one parameters? -- Posted via http://www.ruby-forum.com/.

[Rails] Re: How to get select_tag value in controller?

2008-12-31 Thread Vojtech Rinik
By sending JSON: {name: value, name1:value1, ... } in your case {name: $(id-of-the-element).getValue()} or something similiar. On 31.12.2008, at 12:50, Zhao Yi wrote: zero0x wrote: I suppose you're using prototype, so you just need to get the value of the select box.

[Rails] Re: How to get select_tag value in controller?

2008-12-31 Thread Vojtech Rinik
Oh I'm sorry that was probably wrong advice :) Forget about it. I just realized, that you're sending a http query, which looks like: name=valuename1=value1... So it's pretty simple: query = name=+...+name1=+... On 31.12.2008, at 12:50, Zhao Yi wrote: zero0x wrote: I suppose you're using

[Rails] Re: How to get select_tag value in controller?

2008-12-29 Thread zero0x
I suppose you're using prototype, so you just need to get the value of the select box. $(id-of-the-element).getValue() On 28. Dec., 15:04 h., Zhao Yi rails-mailing-l...@andreas-s.net wrote: Frederick Cheung wrote: You have to tell remote function what to submit, it's not going to guess

[Rails] Re: How to get select_tag value in controller?

2008-12-28 Thread zero0x
Check source code and find select name=xxx The xxx value is what you can access with params[:xxx] -- Good advice: Download Firebug plugin for Firefox, which shows all the communication between page and server, and you'll see all the POST variables with the values :) On 28. Dec., 14:08 h.,

[Rails] Re: How to get select_tag value in controller?

2008-12-28 Thread Zhao Yi
zero0x wrote: Check source code and find select name=xxx The xxx value is what you can access with params[:xxx] -- Good advice: Download Firebug plugin for Firefox, which shows all the communication between page and server, and you'll see all the POST variables with the values :)

[Rails] Re: How to get select_tag value in controller?

2008-12-28 Thread Frederick Cheung
On 28 Dec 2008, at 13:34, Zhao Yi wrote: zero0x wrote: Check source code and find select name=xxx The xxx value is what you can access with params[:xxx] -- Good advice: Download Firebug plugin for Firefox, which shows all the communication between page and server, and you'll see all

[Rails] Re: How to get select_tag value in controller?

2008-12-28 Thread Zhao Yi
Frederick Cheung wrote: You have to tell remote function what to submit, it's not going to guess for you. This is what the :with option for remote_function is for. Check the docs for link_to_remote for some examples, I've got some extra ones at