Menu Problem

I have a vector containing a vector

[[code,color,category],[code,color,category],[code,color,category]]

I then pass this vector z to jsp and remove them

for(int s=0; s<rowCount; s++)

{

vector c = (Vector) z.elementAt(s);

The code is then displayed in a ><select> menu

<option value="<%=c.elementAt(0)%>"><%=c.elementAt(0)%></option>

}

What I want to be able to do is to create another object that will be code = color, category; When these are selected I want to be able to display the color and category in 2 text boxes. This is done using javascript.

What I was wondering is about an object to put the values into say array or something that could be easily referenced. The code will be passed back then I want to get the color and category.

Can anyone make a suggestion

Thanks,

Ys

[914 byte] By [Smartie_ys] at [2007-9-26 1:29:54]
«« Web Page
»» password
# 1

[[code,color,category],

<select name="Color" onChange='ShoColor(this)' >

<%

for(int s=0; s<rowCount; s++)

{

vector c = (Vector) z.elementAt(s);

The code is then displayed in a <select> menu

<option value="<%=c.elementAt(0).toString().trim()+"|"+c.elementAt(1).toString().trim()+"|"+c.elementAt(2).toString().trim %>"><%=c.elementAt(0)%></option>

<%

}

%>

<Script>

function ShoColor(comboObj){

String valueString=comboObj.value;

var varArray=valueString.split("|");

code = varArray[0];

color = varArray[0];

category= varArray[0];

}

</script>

hope this is what you needed... ;)

sribk at 2007-6-29 1:27:14 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...