hello, I am trying to display a Textarea if a user checks the checkbox
and hides the textarea if the checkbox is not clicked. I can get the
display working properly, however the actual checkbox is not actually
checking. It is staying blank (not checked) no matter how many times I
click it.
Here is my code
<%= check_box “event”, “has_policy”, “onclick” =>
“Effect.toggle(‘policy’); return false;” %>
Yes I want add a policy/terms
agreement
<%= form.text_area :policy_a, :id=> 'field19', :cols => 50, :rows =>
10, :class => "medium" %>
On 9/13/07, bradigan [email protected] wrote:
Yes I want add a policy/terms
agreement
I’m guessing that “return false” is preventing the onclick from taking
its default action, which is to check or uncheck the box.
So if you try ‘return true;’ is it always checked?
I’m guessing that “return false” is preventing the onclick from taking
its default action, which is to check or uncheck the box.
I thought same thing. I tried that as well, but it broke the Toggle
event.