On May 19, 6:59 pm, Tyler Knappe <[email protected]>
wrote:
> :onchange => start_date_time = $F, end_date = end_date_time[1,4]}
>
> My question is two fold; I want to update the local values for time and
> date.  Is this the best method?  How would I go about doing it?  Google
> seems to be failing me, but I'm new to RoR so I may be searching for the
> wrong thing.

You seem to have a misapprehension about what code is being run
where: :onchange is a javascript fragment - you need to write a chunk
of javascript to do this. that chunk of javascript cannot do anything
to any ruby variables (other than by causing a request to be made).
The reason you get the error that you get is that ruby evaluates
start_date_time = $F, end_date = end_date_time[1,4] at the point that
your template is rendered and you presumably don't use a global
variable called $F.

I've never used calendardateselect and I'm not entirely sure what
you're trying to do, but either you need to do some client side stuff
or you need something in your action to preprocess what gets
submitted.

Fred
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to