I have a list of countries and a list of cities for each country. I set both as drop-down list.
My problem is how can I change the cities listed when the selected co
A note appart, you're using the deprecated JRequest::getInt();
where you should be using
$input = JFactory::getApplication()->input;
$country_id = $input->getInt('country_id', 0);
In order to change the second select, you must trigger the update of the second select:
$(".country").change(function(){
// your ajax call from your code
// on success, you need to trigger the second select by using
$( ".city_id" ).val(your_value_from_ajax_response).trigger( "liszt:updated" );
});