# AJAX link\_to\_remote or form\_remote\_tag

**URL:** <https://www.ruby-forum.com/t/ajax-link-to-remote-or-form-remote-tag/99578>\
**Category:** Rails I18n\
**Created:** [July 24, 2006, 8:18am UTC](https://www.ruby-forum.com/t/ajax-link-to-remote-or-form-remote-tag/99578 "2006-07-24T08:18:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [July 24, 2006, 8:18am UTC](https://www.ruby-forum.com/t/ajax-link-to-remote-or-form-remote-tag/99578/1 "2006-07-24T08:18:37Z")

</div>

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
