I have a department table and a doctor table in my database (MYSQL). the issue is, I have a two drop down lists, one to select the department, and based on the selected department, the second drop down list will be populated. I'm using jsp to show the drop down lists, and java servlet as the server side script. And I guess I need to use javascript or Ajax to send the name of the department to the servlet, then retrieve the doctors associated with that department, and return the list of doctors to javascript so I can display them on the drop down list. but I don't know how to send data from javascript/Ajax to the servlet and vise versa. please help me out
Asked
Active
Viewed 26 times
0
-
Welcome to Stack Overflow! Visit the [help], take the [tour] to see what and [ask]. Please first ***>>>[Search for related topics on SO](https://www.google.com/search?q=javascript+servlet+cascading+dropdown+site%3Astackoverflow.com)<<]`](https://meta.stackoverflow.com/questions/358992/ive-been-told-to-create-a-runnable-example-with-stack-snippets-how-do-i-do) snippet editor. – mplungjan Dec 02 '21 at 10:45