jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes Dynamic select list with JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Dynamic select list with JSP" Watch "Dynamic select list with JSP" New topic

Dynamic select list with JSP

Rosa Thimerman

Joined: Mar 30, 2001
Posts: 4
Hello, everybody,
I need to build dynamic select list within a table.
the size of this selection will depend on userlogin permission.
I need be able to have my selection box size same as my table.
option value should come dynamicaly as well as option name.
Please, help
Ghazanfar Qureshi

Joined: Nov 15, 2000
Posts: 20
<td><form method="post" name="" action="">
<select name="mySelect" STYLE="width:80px">
//suppose u ve an array of permission and array of
// value or numeric id matching at respective index

String perm[] =new String[10];
int permid[] =new permid[10];
// some how u fill both the arrays from database or hard-coded
//it depends on you
for (int i=0; i< perm.length; i++){
<option value="<%=permid[i] %>"><%= perm[i] %></option>

for fixed width i used the style sheet tag it wont run on olser browser
Ghazanfar Qureshi
I agree. Here's the link: http://aspose.com/file-tools
subject: Dynamic select list with JSP
It's not a secret anymore!