AJAX link_to_remote or form_remote_tag

In one of my forms, I have 2 date input fields (start_date and
end_date) each one depending on the other ( need to add/substract
variable period)

I wrote that , but how the methods start_changed or end_changed can
modify the date value to add/sbstract a period before the replacement
of teh corresponding div… ?

<%= link_to_remote(“starting_date”, :update => ‘dd_enddate’, url =>
{:action => :start_changed} ) %>

Booking Start Date

<%= text_field “bookings”, “startdate”, options = {:class =>
‘format-d-m-y’, :maxlength => “15” } %>

<%= link_to_remote(“starting_date”, :update => ‘dd_startdate’, url =>
{:action => :end_changed} ) %>

Booking End Date

<%= text_field “bookings”, “enddate”, options = {:class =>
‘format-d-m-y’, :maxlength => “15” } %>

or should I use a form_remote_tag ? but these 2 fields area already
within a form … does it matter ?

thanks for your help

joss

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs