We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,039 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Obeserve_field

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
1
Contributor
0
Replies
1
View
alexgv14
Light Poster
49 posts since Feb 2008
Reputation Points: 10
Solved Threads: 1
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0520 seconds using 2.63MB