Hello all
I have very strange issue with my code.
i have a select tag, onchange it is calling a function. but i want to
pass selected value from drop down in that function. But that function
is already performing few actions, so I have to use overwrite_params.
please look at following code:
select_tag(‘srtType’, options_for_select([‘Sort By’, ‘Price’, ‘Title’,
‘date’]),
{
:onchange => remote_function(
:url=> { :controller => ‘listings’, :action
=> :search_results, :overwrite_params => { :srtType =>
“this.value”] }} ,
:method => "'post'" )
}
)
overwrite_params => { :srtType => “this.value”] } is not passing
selected value. it is passing it as string.
Please advice.
Ajit