I've got a partial that I'm trying to refresh, but I don't get back any
results, nor do I see any errors in Firebug. I'm guessing there's a
problem with the DOM, but I'm not sure. Can someone else take a look
and let me know where I'm missing something?
Controller:
def get_city_list
@show_javascript = true
@counties = StateList.find_by_state_code(params[:state_code])
render :update do |page|
page.replace_html 'city_select', :partial => 'city_list'
end
I've got a partial that I'm trying to refresh, but I don't get back
any
results, nor do I see any errors in Firebug. I'm guessing there's a
problem with the DOM, but I'm not sure. Can someone else take a look
and let me know where I'm missing something?
Have you checked that state_code is actually the id of the form
element you're interested in? I would expect it to be more like
state_code_state_code based on what you've got above.
Have you checked that state_code is actually the id of the form
element you're interested in? I would expect it to be more like
state_code_state_code based on what you've got above.
Thanks for your help.
I had thought that I needed to observe :state_code, but I actually
needed to observe 'state_code'