Controller action

Hi,
im using simple models to add/edit/remove data from a database. I have created 2 tables 'cities' and 'countries', and I want to link them using Ajax so when I select a country from a dropdown menu, the city dropdown gets populated. I have created a function with jquery so when the user selects an option from the dropdown, an ajax call is fired. The problem is that I need to specify a URL to a controller action to get that data from the database. I have created a controller/cities.php under fuel/models/ and added some actions, but I dont know to figure out the URL of these actions.
Thanks in advance!

Comments

  • edited 11:47PM
    Where does the cities.php controller exist? In the fuel/models or fuel/controllers folder?
  • edited 11:47PM
    exists in my_project_folder/fuel/application/controllers/cities.php
  • edited 11:47PM
    The URL that your AJAX can call would be /cities/ajax_method where "ajax_method" is the controller method you created to handle the request on cities.php.
Sign In or Register to comment.