JSP: drop down list 2 depends on drop down list 1

前端 未结 2 1436
予麋鹿
予麋鹿 2020-12-21 15:57

I am having difficulties while dealing with two linked drop down lists which the drop down list 1 will fetch the values from the DB and based on the user\'s selection, it wi

2条回答
  •  清酒与你
    2020-12-21 16:34

    You're making a fundamental mistake of assuming that the Java code present in the scriptlets gets executed at the client end!

    take a look at the lifecycle of a JSP. After that you'll be in a much better position to understand why your code doesn't work.
    thereafter, you should try looking into some Cascading Dropdown examples using AJAX.

    if all that doesn't help - post in again and it'll be much easier to guide you through.

提交回复
热议问题