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 %>

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

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
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to