On Sep 10, 6:34 pm, Pat <apre...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi,
>
> I have a text field which is :
>
> <%= text_field( "select", "name" ,{:onchange =>
> "this.form.submit();"} ) %>
>
> I want to search database using value entered by user, and when search
> results are displayed, I want to have text field retailn the value
> which was entered to have search results.
>
> I did something like this,
>
> <% eventname = params[:select_name]%>
> <%if eventname!=nil%>
> <% @select.name = eventname %>
> <% end %>
>
> Still, it does not contain that value which user entered.
>
> Can anyone help please?
>
Take a look at development.log (or if you''ve just done ruby script/
server, the output will be in that window too). The log shows you the
params hash for each request. You should be able to work it out from
there.
Fred
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---