passing multiple parameter through observe_field

Hi!

Im trying to search through multiple parameters through observe_field.

Following is my code.: its not showing any result, kindly help..

<label for="dev_name">Filter on Device Name : </label> <input id="search" name="search" type="text" value=""> <label for="dev_platform">Filter on platform : </label> <input id="search1" name="search1" type="text" value=""></form>

<%= image_tag("spinner.gif",               :align => "absmiddle",               :border => 0,               :id => "spinner",               :style =>"display: none;" ) %> </p>

<%= observe_field 'search', :frequency => 2,          :update => 'table',          :before => "Element.show('spinner')",          :success => "Element.hide('spinner')",          :url => {:action => 'trackLocation'},          :with => "'search='+ escape($('search').value) + '&search1=' + escape(value)"%>

<div id="table"> <%= render :partial => "devices_list" %> </div>

and controller looks like:

def trackLocation @labs=Labt.find(:all) conditions = ["name LIKE ?", "%#{params[:query]}%"] unless params[:query].nil?

@devices=Dev.find(:all,:conditions=>["name LIKE ? and platform LIKE ?", "%#{params[:search]}%","%#{params[:search1]}%"]).paginate :per_page=>5,:page=>params[:page]

#devs_per_page=5 #@devs_pages, @devs = paginate :devs, :conditions => conditions, :per_page => devs_per_page      if request.xml_http_request?    render :partial => "devices_list", :layout => false     end        end

This also dint helped… basically i want to search through both the parameters . …

Supriya Agarwal wrote:

This also dint helped.. basically i want to search through both the parameters . ..

On Wed, Jun 18, 2008 at 3:11 PM, Suneeta Km <

You can pass the value of the element you are observing. what do u mean by escape(value)?