I have an observe_field on a select box. All works well,
EXCEPT....this particular select box is a js masterpiece that allows
it to be editable in selection index 0.
My problem thus is if someone selects the 0th item in the select box,
types in a value, the observe_field still picks it up in my controller
as "" for params[''channelnotes''].
Is there a way to amend the observe_field to send back whatever the
text is in the select box? (and not just when the user clicks on it to
invoke the change, because then, of course, option 0 text is "") I
need to somehow just pass the text of the selected item in it whenever
the text itself changes. Does anyone know observe_field on select
boxes well enough to know how to do this? -Janna B
<SELECT name="channelnotes" id="channelnotes"
style="width:350px;
onKeyDown="fnKeyDownHandler(this, event);"
onKeyUp="fnKeyUpHandler_A
(this, event); return false;" onKeyPress = "return fnKeyPressHandler_A
(this, event);" onChange="fnChangeHandler_A(this, event);">
<OPTION value="" ></OPTION>
<option>one</option>
<option>two</option>
<option>three</option>
</SELECT>
<%= observe_field "channelnotes", :url => {:controller
=> :channels, :action => ''notesboxchange'' }, :with =>
''channelnotes'' %>