i am work on an app where combo box is define in each row of table in a jsp. when i select the specfic color from combo box it is doing the same color on whole row.
now i want, when i set the color of each row and submit the page using submit button when again i open the detail of the same id, previous state of colors can be show in a jsp which i have been set.

now situation is, after the submit when i again open the same id of a client, it show the color value on combo box which i have select but not show the associated color on a row.

this code making a combo box in .java file

public String getColor(String colorName) 
{
StringBuffer s1 = new StringBuffer();
s1.append("<select onchange=\"ChangeColor(this);\" style=\"font-size:0.8em;\" id=\"").append(colorName).append("\" name=\"").append(colorName).append("\">")
            .append("<option value=\"\">&nbsp;</option>");
}

function define in jsp page

function ChangeColor(colors) {
var partcolor = (colors.options[colors.selectedIndex].value);

if (partcolor=="black"){
  document.getElementById("colorRow").style.backgroundColor = 'black';
 } 
else if(partcolor=="brown")  {
 document.getElementById("colorRow").style.backgroundColor ='brown';
}   else if(partcolor=="yellow")  {
 document.getElementById("colorRow").style.backgroundColor ='yellow';
}
}

please help.

This is the Java forum - perhaps you would be able to get more help in the JSP forum :)

Stick with your JSP Thread.

Closing this thread.

P.S. its called "actually making use of the session".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.