• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
dropdown 1 selection populates dropdown 2?

#1
[eluser]w1n78[/eluser]
i have 2 drop down menus. the first drop down is a list of districts. the second are schools. if a district is selected, i'd like the schools that belong to that district populate the 2nd drop down. here's how my db looks like

district table
district_id
district_name


school table
school_id
school_name
district_id

so the relationship is district.district_id = school.district_id. before MVC i used jquery and passed the IDs through the querystring and used $(.get). i know how to set up the models but how do i get the controller to work? i'd like this to be in one form on one page.

#2
[eluser]xeroblast[/eluser]
use AJAX on this one if you dont want a page refresh. or could just use simple php.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.