Re: how HTML_Option works?


#1

Not sure about how to get the exact scenario below to work, but an
alternative is to use Observers. Observers let you monitor a field and
make an ajax call to the handler when the value changes. It even sends
the new value to the handler.

Described nicely in the ajax on rails article at
http://www.onlamp.com/pub/a/onlamp/2005/06/09/rails_ajax.html?page=2

Hope this will help

Bharat

Ok, it worked but I have another problem now…

I am using this form_remote_tag to manage my form:

form_remote_tag( :url => {:action => “update_variation”},
:loading
=>“Element.show('search-indicator_” +
h(@generic_variation.id.to_s) + “’)”,>
:complete =>
“Element.hide('search-indicator_”+
h(@generic_variation.id.to_s) + “’)”,
:html => {:name =>
“form_for_” + @generic_variation.id.to_s})
-%>
my browser goes to …/update_variation insted of just running the ajax