1,105,417 Community Members

Obeserve_field

Member Avatar
alexgv14
Light Poster
49 posts since Feb 2008
Reputation Points: 0 [?]
Q&As Helped to Solve: 1 [?]
Skill Endorsements: 0 [?]
 
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
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: