Observe_field question

Thanks all for answering my previous questions.

This one is based off of my last question involving graphs and
allowing users to filter through the data however they wish in my
app. The way I envision allowing the users to filter is by setting up
a rules view similar to that of apple’s mail rules builder basically
I have a set of drop downs that get built based on different criteria
dynamically. These drop-downs are created based on a users selection
from the first select box and so on. I am using observe_field to
watch the selection of the various boxes and than building new ones
based on data from the database. At the end of each row is an add and
delete button. When you click on add a new row appears at the bottom
of the list (using ajax prettyness). Where I am running into an issue
is that each box needs to be unique so that when I submit the form I
get all the parameters that I need to run the query and display the
results.

Also I am using select_tag for my drop-downs as these fields are not
directly associated with any model in particular.

What is the correct way to observe a select box where the div that
wraps the content as well as the name of the select box is dynamic?
can I observe a field that is associated with an array? I have tried
the following:

<%= select_tag(‘filter_type_#{@params[:rule_num]}’, " </
option>CompanyDivisionDate</
option>") %>
<%= observe_field(‘filter_type_#{@params
[:rule_num]}’,
:update =>
‘filter_container_#{@params[:rule_num]}’,
:url => { :controller =>
‘take’, :action => :lookup_filter_type },
:with =>
“‘filter_type_’+#{@params[:rule_num]}+’=’+escape(value)
+’&object_id=’+#{@object.id}+’&rule_num=1’”) %>

but nothing happens (at least not what should happen)

Any help would be appreciated.

Andrew

Well i am an idiot I was able to get this to work by removing the :
and quoting the variable in the params statement. Had a huge
brainfart I guess.

Andrew