I have 3 combo box: Department, Courses, Activities. The Department combo box which will load all departments from the department table. I need to load the courses in one combo box and activities in another combo box which belong to a department. The table schema is shown below.
Department Table
----------------
| Dept | Name |
----------------
| 1 | Dept1 |
| 2 | Dept2 |
----------------
Department Course Table
----------------------
| Cid |Dept | Course |
----------------------
| 1 | 1 | abc |
| 2 | 1 | xyz |
| 3 | 1 | pqr |
| 4 | 2 | bar |
| 5 | 2 | foo |
----------------------
Department Activities Table
---------------------------
| Aid | Dept | Activities |
---------------------------
| 1 | 1 | foo1 |
| 2 | 1 | foo2 |
| 3 | 1 | foo3 |
| 4 | 2 | bar1 |
| 5 | 2 | bar2 |
---------------------------
Department combo box will load Dept 1 and Dept 2. When Dept1 is select the Courses which belong to Dept1 should load in Courses combo box i.e (abc,xyx,pqr) and Activities which which belong to Dept1 should load in Activities combo box i.e (foo1,foo2,foo3).
How to call two functions at the same time in AJAX or jQuery?