1.11M Members

Obeserve_field

 
0
 

My observe field doesn't do anything any idea why.

<%= observe_field 'keyword', 
        :frequency => 0.5,
        :update => 'results',
        :loading => "Element.show('.spinner')",
        :complete => "Element.hide('.spinner')",
        :url => { :action=> 'search_results' },
        :with => 'keyword' %>


        <%= form_remote_tag :url =>{ :action => :search_results }, 
        :update => "results", 
        :loading => "$('.spinner').show()",  
        :complete => visual_effect(:slide_down, "results", :duration => 0.9) %>



                    <fieldset>
                        <legend>Tutor Search.</legend>
                        <label for="searchItField">Keyword Search.</label>

                        <%= text_field_tag(:keyword) %>

And here is my controller

def search_results
       keyword = params[:keyword]
       @tutors = Tutors.find(:all,:conditions => ["category LIKE ?", '%' + keyword + '%'])    
  end
You
Post:
Start New Discussion
View similar articles that have also been tagged: