I have the following code to display the table of my countries in the selection box:
f.select("country_id", Country.all.collect {|p| [ p.name, p.id ] }, {:include_blank => 'Select a Country'})
and I want to set the action "onchange" when the country es is selected ... I tried:
f.select("country_id", Country.all.collect {|p| [ p.name, p.id ] }, {:include_blank => 'Select a Country',:onchange=>"alert('foo')"})
f.select("country_id", Country.all.collect {|p| [ p.name, p.id ] }, {:include_blank => 'Select a Country',:onchange=>"alert('foo')"})
but nothing happens ....
any help on this?
Thanks. Mr Nizzle
source share