Observe_field


#1

Hi Friends.
Its me newb having one Problem.
I have 3 dynamic dropdown menus.

select Company => select Department => Select Role.

I done this using Observe_field.
Its all works fine in Firefox.
But not in IE7
What would be the Problem.
Pls Assist Me.
Thanks …

Here starts my code

<% remote_form_for( :userinfo, userinfo,:url => { :action => ‘add’ },
:html => { :id => ‘userCreateForm’ } ) do |f|
%>

Login :
<%= f.text_field :login %>
<div class='FieldError'>
  <%= error_message_on( userinfo, :login ) -%>
</div>
Company :
Select Company <%= options_from_collection_for_select( CompanyInfo.find( :all),"id","company_name" ) %> <%= observe_field("userinfo[company_id]", n => "changed", :update => "userinfo[department_id]", :url => {:action => :update_department}, :with => "'company_id='+value") %>
</div>
Department
Select Department <%= render( :partial => 'departments', :object => @departmentinfo, :locals => { userinfo => nil} ) if @departmentinfo %>
<%= observe_field("userinfo[department_id]",
    n => "changed",
    :update => "userinfo[role_id]",
    :url => {:action => :update_roles},
    :with => "'department_id='+value") %>
Role
Select Role <%= render( :partial => 'roles', :object => @rolesinfo, :locals => { :userinfo => nil} ) if @rolesinfo %>
<% end %>