How to get the value of a text field

Hi everyone,

I need to get the value of one text field when clicking “next page”.
My code looks like:

this is the view page:
<% form_tag(‘javascript:void(0)’) do
%>

<%= text_field_tag 'search' %>

<%=

observe_field :search,
:frequency =>
0.5,
:update =>
‘my_friends’,
:url => {:action =>
‘search’},
:with => “‘search=’ + encodeURIComponent
(value)” %>
<% end %>
<% end %>

<% @friends.each do |friend| %> <%= friend.name %> <% end %> <%= will_paginate @friends, :params => {:search => ???? } %>

The problem is: I dont know how to pass the value of the search text
field to <%= will_paginate @friends, :params => {:search => ??? } %>.
Can anyone help me out??

thanks
xiahong

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs