Forum: Ruby on Rails how to add onchanget event to select field

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Thiti P. (Guest)
on 2009-03-28 09:54
(Received via mailing list)
Hello,
I would like to add javascript 'onChange' event handling for a select
field, such as
    <div class="form_row">
        <label for="s_modify">Modifiers</label>
        <%= form.select :s_modify, ([ "Frequency", "Genotype",
"Germline", "Group", "Haplotype",  , "Metagenomic", "Pathovar",
"Plasmid-name", "Plastid-name", "Pop-variant"  , "Rearranged",
"Segment",  "Subclone", "Subgroup", "Substrain", "Subtype", "Synonym",
"Transgenic", "Type", "Variety" ]) %>
      <label for="vaule_sm">Value</label>
       <%= form.text_field :vaule_sm%>
     </div>

by if  user select Metagenomic or 'Germline or 'Rearranged' or
'Transgeni.

the vaule_sm is "TRUE"

Anyone know how to make this work?
This topic is locked and can not be replied to.