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

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Thiti P. (Guest)
on 2009-03-28 09:54
(Received via mailing list)
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>
        <%= :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%>

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

the vaule_sm is "TRUE"

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