Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

content of dropdown B will depend on what is selected on dropdown A

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys, i want to know how to do this in JSP..

Say I have dropdown A:

<select name = "mySelect">



now depending on what was selected in drodpownA, drodown B will have the following options,

if "A" was selected, values 1, 2, and 3 will be the options
if "B" was selected, values 4, 5, and 6..
and if "C" was selected, values 7,8,9.

Now, these values (1-9) will be loaded from the database. and I just want to have a single page for the two dropdowns, how would that be possible? Could you write me the code?

I know how to pass values and load data from the database by using forms.
<form name = "myForm" method = "post" action= "">
but we all know that the values will be processed by creating a submit button.

With a dropdown menu, how would that be?
Is this possible?
<select name = "mySelect" method = "Post" action = "">
then onChange (when an option is selected in the dropdown, the page will then process the data.

Thanx in advance!
Ben Souther
Posts: 13411
Firefox Browser Redhat VI Editor
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic