I am making country state and city drop down with the help of ajax in our codeigniter frame work .
The structure of database given bellow.
Country
create a javascript variable
var base_url = "=base_url()?>";
in your javascript code conecat it
url: base_url+"home/get_cities/"+country_id,
use firefox and firebug to debug your ajax code