Help please with observe_form - not working

My observe_form is basically totally limp. I think it should update without hitting submit button but even if I hit it , it doesn’t change (doesn’t seem to post the data). Can anyone please take a look and see if I"m doing something wrong. TIA

Form: <% start_form_tag({:action => “livesearch”}, :id => “asearch”) %>

Category

<select name=“cat”, @params[‘cat’],size=“2” multiple=“multiple”><%= options_from_collection_for_select @categories, :id, :name %>

State Terms Title

enter in as many titles as you wish seperated by a comman

<%= text_field("title", @params['title'], :size => 10) %> City

enter in as many cities as you wish seperated by a comman

<%= text_field("city", @params['city'], :size => 10) %>

<%= submit_tag ‘livesearch’ %> <% end_form_tag %>

<%= observe_form “asearch”, :frequency => 1, :update => “table”, :with => “Form.serialize(asearch)”, :complete => “Element.show(‘table’)”, :url => { :action => “livesearch” } %>

<%= render :partial => "positions_list" %>

Controller:

def livesearch @categories = Category.find(:all, :order => “name”) @states = State.find(:all, :order => “name”) @terms = Term.find(:all, :order => “name”)

params[:cat]
params[:stat] params[:term] params[:city] params[:title]

pq = Position.query # the syntax is because I"m using a plugin CriteriaQuery, a find wrapper. pq.category_id_in(params[:cat]) if params[:cat] pq.state_id_in(params[:stat]) if params[:stat] pq.term_id_in(params[:term]) if params[:term] pq.city_in(params[:city].split(‘,’)) if params[:city] pq.title_in(params[:title].split(‘,’)) if params[:title] @positions = pq.find

if request.xml_http_request? render :partial => “positions_list”, :layout => false end end

end

<script type
="text/javascript">
//<![CDATA[
new Form.Observer('asearch', 1, function(element, value) {new Ajax.Request('/ajaxsearch/livesearch', {asynchronous:true, evalScripts:true, onComplete:function(request){
Element.show('table')}})})
//]]>
</script>

No one ? Alright let me ask this then - when using observe_form does each element have to have it’s own id and name ?

Stuart