Hi, I tired ajax search form followed railscast 240 but when i applied the same code from railscast tutorial(ajax code), i have an issue the search functionality not working, i''m not good in ajax, can any one suggest what wrong functionality i did. Here i attached some screen short for understanding purpose. Here the ajax code: * jQuery("#projects_search input").keyup(function() { jQuery.get(jQuery("#projects_search").attr("action"), jQuery("# projects_search").serialize(), null, "script"); return false; }); * In my projects controller: *@status = params[:status] || 1 scope = Project.status(@status) scope = scope.like(params[:name]) if params[:name].present? @search = scope.visible.map {|p| p.self_and_ancestors }.flatten.uniq.sort_by(&:lft) respond_to do |format| format.js { @search = @search.select {|p| p.level == params[:level].to_i and p.parent_id == params[:parent_id].to_i }.sort_by(&:name) render :partial => ''level'', :locals => {:search => @search, :start_level => params[:level]}, :layout => false }* In my app/views/projects/index.js.erb *jQuery("#level").html("<%= escape_javascript(render("level")) %>");* In my app/views/projects/index.html.erb *<%= form_tag({}, :method => :get, :id => "projects_search") do %> <%= text_field_tag ''name'', params[:name], :size => 30 %> <% end %> <div id="level"><%= render :partial => ''level'', :locals => {:search => @search, :start_level => 0} %></div> * In my render partial app/views/project/_level.html.erb *<% search.each do |project| %> <% level = start_level.to_i %> <tr <%= project_nesting_id_and_classes(project, level) %><% if User.current.allowed_to?(:view_project, project) %> onclick="location.href = ''<%= project_path(project) + ((project.module_enabled?(:issue_tracking))?"/issues":"") %>'';"<% end %>> xxxxxxxxxxx <% end %>* Joshua :) RoR -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.