display dynamic table rows in the same page

admin

Administrator
Staff member
There are three drop down boxes: shopname, country and sell at the top of a page.(initial value of the above drop down boxes is set to "ALL")
Below the drop down boxs, there is a table for displaying all records
i.e.
the following is the table:(retrieved from database)
shopname country sell
***************************
shopABC HK stationery
shopABC US flowers
shopABC BK furniture
shop123 HK flowers
shop123 HK fruit
(i have successfully got all the records from database into this jsp, and have put all the result set to a two-dimensional array )

what i want to do is: when user click the drop-down box "shopname" with value "shopABC", then the table will be filtered and displayed as
shopname country sell
***************************
shopABC HK stationery
shopABC US flowers
shopABC BK furniture

if user click the drop-down box "country" with value "HK", then the table will be displayed as
shopname country sell
***************************
shopABC HK stationery
shop123 HK flowers
shop123 HK fruit

if user click the drop-down box with both "shopname" and "country" with value "shop123" and "HK"
then the table will be displayed as
shopname country sell
***************************
shop123 HK flowers
shop123 HK fruit

How can i do that??
 
Back
Top