I have been trying to pass a collection_select parameter and a text
field
parameter to observe_field so that it watches both the parameters
simultaneously.
but what i can see is , when i select some value from drop down and dont
write anything in text field its giving correct results.parameters are
also
correct passed, but just after that if i write something in text field
that
value also get passed as collection_select parameter(labtid in my case)
my view code is:
Filter on Device Name :
<%= text_field_tag(“query”, params[‘query’], :size => 10 )%>
Lab :
<%= collection_select(:labt, :labtid,
@labs, :id, :name,:prompt => “Select a Lab”) %>
<%= observe_field ‘query’, :frequency => 2,
:update => “table”,
:before => “Element.show(‘spinner’)”,
:success => “Element.hide(‘spinner’)”,
:url => {:action => ‘trial_location1’},
:with => “‘labtid=’ + value+‘&query=’+escape($(‘query’).value)”
%>
<%= observe_field ‘labt_labtid’, :frequency => 2,
:update => “table”,
:before => “Element.show(‘spinner’)”,
:success => “Element.hide(‘spinner’)”,
:url => {:action => ‘trial_location1’},
:with => "'labtid=' + value+'&query='+escape($('query').value)"
%>
i believe the problem lies with :with parameter.
Can someone suggest me the problem?
Thanking in advance!!
View this message in context:
http://www.nabble.com/observe_field-tp18009235p18009235.html
Sent from the RubyOnRails Users mailing list archive at Nabble.com.