Hi,
Yet another newbie here… I’m writing an appliction in Rails, and I’ve
Ajaxified my select boxes so they update dynamically. I used the
“observe_field” method to monitor changes to my select box. I find that
it’s kind of erratic… it updates constantly and makes the selection
for me, based on where my mouse happens to be hovering when it does its
observation. Not very user friendly. I’d much rather the onChange
event, but I’m not sure exactly how to write the syntax for using the
event.
Here’s my code as it is now:
<%= options_from_collection_for_select( Product.find_all, "proddesc_pk", "prod_name" ) %> <%= observe_field("product[proddesc_pk]", :frequency =>0.25, :update => "component_id_list", :url => { :action => :fill_component_box}, :with => "'id='+value") %>How would I go about changing that code so that it updates based on an
onChange event, rather than the observation?
Any help would be greatly appreciated!
Thanks,
~ Shanan
–
Shanan S. | [email protected] | (602) 357-4327 (x51609)
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
“Crucify the ego before it’s far too late
And leave behind this place so negative and blind and cynical
And you will come to find that we are all one mind
Capable of all that’s imagined and all conceivable”
- Maynard James Keenan, Tool