Chris Habgood wrote:
> then use a js function to check the text box for text and set the
> checkbox accordingly.
Thanks. So, I now have this:
<%= text_field_tag "text_value[#{var}]","", :onblur =>
"check_text_field_for_text(#{var})" -%>
...and:
<script type='text/javascript'>
function check_text_field_for_text(field)
{
if (document.form_name.text_value[field].value == null)
{
document.form_name.tick_box[field].checked = true
}
}
</script>
Still no luck, though. Presumably I am not referencing the name of the
checkbox correctly, but I am not sure of the nature of the error.
--
Posted via http://www.ruby-forum.com/.
--
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.