Hi Venami,
Thank you for your reply.
What i have is a listbox containing column headers that i have extracted from a database, and i need to be able to rearrange them according to the order that i want and save it back into the database. The problem is i do not know how to do a drag and drop for a list box. below will be an example of how i have done it:
Code:
<SELECT NAME='userId'>
<%
String sqlUserIdSelect = "SELECT DISTINCT UserId FROM kplustp..ProfilingGridFieldUser";
stmt = con.createStatement();
resultSet = stmt.executeQuery( sqlUserIdSelect );
int userRowNum = resultSet.getRow();
int userColNum = resultSet.getMetaData().getColumnCount();
%>
<%
int a=1;
while ( resultSet.next() )
{
for( int b=1 ; b<=userColNum ; b++ )
{
String userColResult = resultSet.getString( b );
out.println( "<OPTION VALUE='" + userColResult + "' ");
if (userId!=null && request.getParameter("userId").equals(userColResult))
{out.println("SELECTED");}
out.println(">" + userColResult + "</OPTION>" );
}
}
%>
</SELECT>
Basically it is just a <SELECT> listbox, but i need to move the elements within it up and down by drag and drop to rearrange them. if still not clear, maybe i could upload some pictures to show you a clearer example?