If observe_field isn't going to call more than once, but you could try
observe_form instead?

<%= observe_form :new_item, :function => 'datum_geklikt()' %>

I know it's not ideal but instead of passing arguments true and false
to the function, have the function determine the current value of the
radios (or one radio) and change the values appropriately.

These are just ideas, I'm afraid I'm not too experienced with ajax and
rails.

Maybe one of the more experienced users can lend a hand if this
doesn't work?

On Feb 27, 9:10 pm, ruud <r.grosm...@gmail.com> wrote:
> On Feb 27, 7:23 pm, Gavin <ga...@thinkersplayground.com> wrote:
>
> > what do you have in the date_clicked() function now?
>
> Hi Gavin,
>
> I had the same idea:
>
> function datum_geklikt (geenDatum)
> {
>     var doc = window.content.document;
>     alert('jep');
>     doc.getElementById( 'dagid').disabled = geenDatum;
>     doc.getElementById( 'maandid').disabled = geenDatum;
>     doc.getElementById( 'jaarid').disabled = geenDatum;
>
> }
>
> That's why I can say for sure the function is only called on the first
> click. Only directly after the first click, I get the alert (note the
> variable names are different; I translated the first posts, this one
> is untranslated). It is not the button, because after a reload, I get
> the alert, no  matter if the first button was checked first, or the
> second button.
> Of course the disabling/enabling of the date select is only done once
> too; although the error console shows nothing.
>
> I hope you can shine a light on this one; I don't know what I should
> start with...
>
> regards, Ruud
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to