Forcing onChange in a partial


#1

I have a partial view which incorporates on onChange option in a form.
It works great when I actually change the select box which it is an
option to. However, when the div which contains this partial first
shows, the onChange doesn;t fire. How can I force this to fire when it
is first shown? Thanks Janna B,

<%= f.label :country %>

<%= f.country_select :country, Carmen.default_country, {},
{
:onChange => remote_function( :url => { :action =>
‘_get_states’ }, :update => “state”, :with => “‘country=’ +value”)
} %>