Hello all, I''m fairly new to rails. I have a view question that
involves, I presume, javascript.
I have two images, one is a LIKE and one is a DISLIKE image.
I want to have one selected by default, the value of which gets saved
to the DB when the user hits the POST button.
Along with selecting a LIKE or DISLIKE (basically selecting true or
false in radio buttons), the user will type a comment in.
So overall we have
1. comment: textfield
2. like or dislike: boolean or tinyint in the DB: 0 or 1
Selecting either the LIKE or DISLIKE button will not affect the
textfield which remains there for the user''s comment.
I have the radio buttons, the images, and the comment field set up.
I''m not sure how to pre-select one of the images and wire it to
transmit a value.
Any advice in the right direction is greatly appreciated. Thank you.
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.