About values in a form.. w Ajax of course

In a form, I need to observe a value in ahidden field (this value is
calculated by a javascript function and written in a hidden field)
the value is calculated … written (I can display it …) but no change
is detected by my observer…
why ? how can detect it ?

here is my partial .rhtml view

# result

<%= booking_date(@booking.start_at) %> #
link calling the function

# calendar pop-up

<%= observe_field (‘startdate’, :url => {:action =>
‘startdate_selected’}, :with => “‘id=’+value”) -%>

thansk for your help

You might have to use the :frequency option to observe_field. If you
are modifying the field with javascript it might not cause the browser
to through the event’s which is how the default observe function works
without a frequency option. I ran into this problem with submitting a
form through javascript and it wasn’t catching my onSubmit handler
event to cancel it and do a ajax call. But try it with the frequency
option.

On Oct 12, 12:21 pm, Kad K. [email protected]