Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #I have a select that I want to submit when selected, it looks like this:
- <select id="config_<%= conf.conf_name %>" name="config[<%=
- conf.conf_name %>]" onchange="<%=
- remote_function( :url => { :action => :update ,
- :id=>conf.id,'config[confvalue]'=>'+this[this.selectedIndex].value' })
- %>"><option value="0" selected>No</option><option value="1"
- >Yes</option><option value="0" selected>No</option><option value="3"
- >Maybe</option></select>
- #the poblem is that the updated value of confvalue is 'this[this.selectedIndex].value' instead of the selected value.
- #I also tried something like that:
- :with=>config[confvalue]'=>'+this[this.selectedIndex].value'
- #but in that case nothing get updated at all.
- #any idea what's wrong?
- #thanx in advance
- #Pat
Add Comment
Please, Sign In to add comment