2009/9/2 AppleII717 <[email protected]>:
>
> I'm trying to rewrite a fusebox-like application (Active4D plugin to
> 4D database) in RoR/postgres and I'm doing okay - but keep running
> into things that stump me.  It seems like it takes me hours to figure
> out something that I could have written in pure code in minutes.
>
> The select_month and select_day helper has been my latest waste of
> time. All I'm trying to do is add a javascript onchange call and I
> can't get it to show up.
>
> Given:
>
> select_month(date, options = {}, html_options = {})
>
> I have:
>
> select_month(0,:include_blank => true, :onchange => "setBirthMMDD" )
>
> I know I've gotten html options to work on form fields, but maybe I'm
> missing something on how the html_options hash has to be formatted.
>
> I've tried:
>
> select_month(0,:include_blank => true, :html_options => {:onchange =>
> "setBirthMMDD"} )
>
> and that does not work, nor does it generate an error.
>
> We use the birth month and day as a verification field and I'm just
> trying to set a hidden field. Can't ask for birthday because of
> potential age discrimination issues.

If you are just trying to set a hidden field could you not just pass
whatever the user is entering/selecting to the server and compute the
value there rather than doing it in the browser?  I believe it best to
avoid js where possible.

Colin

>
> I've also tried to set style or class and can't seem to get any html
> option to work - so I guess I don't know what I'm doing.
>
> Any help would be appreciated.
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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