I am using Rails 2.3 and I don't know how to retrieve the value of a text_field of a form in order to handle it in the rjs file. I searched on the Internet all day and I didn't find a solution.
Here is my code to be more specific :
In my form.erb file :
<%= observe_field 'issue_'+@issue.id.to_s+'_estimated_hours',
:url=>{:action => 'check_estimated_hours_field'},
:with => "'number=' + escape(value) +
'&fields_estimated_ids=#{@fields_estimated_ids}'"
%>
Controller :
def check_estimated_hours_field
@fields_estimated_ids = params[:fields_estimated_ids]
end
check_estimated_hours_field.rjs :
for @field_id in @fields_estimated_ids
# here I want to add all the values of fields and retrieve the result in a ruby variable
end
How can I manage to solve the problem I encounter in the comment in check_estimated_hours_field.rjs ?