Hi,
i have 2 dropdowns which are dependent from each other:
ItemCategory has many ItemGroups
/Item/New.html
<%= javascript_include_tag “prototype” %>
<%=
collection_select(:x, :id, ItemCategory.find(:all,
:conditions=>[‘division_id=?’,session[:divisionid]]), :id, :title, :id
=> :itemcategory_id )
%>
<%= observe_field :x_id, :update => :ajaxmessage, :url => { :action =>
“changex”} %>
items_controller.rb
def changex
#render :text => "test" #OK
render :text => params[:x][:id]
>>>>>>>>>NIL NIL NIL NIL
…/*
@servers = ItemGroup.find_all_by_item_category_id(2)
render :partial => “person”
…*/
end
_person
<%= collection_select(:x, :bla , @servers, :id, :title ) %>
if u use the same code in a form where i specify the action within the
form header, everything is good and i recieve the id from the
params-tag. But it is no tworking out of that observer - WHY? params is
always NIL!!!
If i debug it in FFBug, i can see the correct POST-Value…
Any Help is really appreciated, im trying to figure this out since
days…