date_select and observe_field

Google didn;t throw too much up on this but I’m sure I’m not the forst to have this problem.

<%= date_select ‘client’, ‘dob’, :use_month_numbers => false, :order => [:day,:month,:year], :start_year => 1920, :end_year => @this_year, :include_blank => true %>

I’ve tried a few variations for the observe_field (below) but no luck. Could anyone shed some light on this, please?

      <%=

observe_field(“client_dob”, :update => “age”, :url => { :controller => ‘client’, :action => :age }, :with => “‘dob(1i)=’ + escape($(‘dob(1i)’) + ‘&dob(2i)=’ + escape($(‘dob(2i)’).value) + ‘&dob(3i)=’ + escape($(‘dob(3i)’).value”, :on => “changed”, :frequency => 0.3 ) %>

<%= observe_field(“client_dob_3i”,

                       :update => "age",

                       :url => { :controller => 'client', :action => :age },

                       :with => "'dob(1i)=' +

escape($(‘dob(1i)’) + ‘&dob(2i)=’ + escape($(‘dob(2i)’).value) + ‘&dob(3i)=’ + escape($(‘dob(3i)’).value",

                       :on => "changed",

                       :frequency => 0.3 ) %>

Merci

-Ants

Disclaimer: Technically speaking, I am always wrong!