How can I get the values into the 3 combo boxes I am using dynamically from a database?

idris yuce

//Text will be shown in the second combo
combo2Text=new Array(2);
//Values of second combobox elements
combo2Values=new Array(2);
combo2Text[0]=new Array('one','two','three');	
combo2Values[0]=new Array('1','2','3');
combo2Text[1]=new Array('ten','twenty','thirty');	
combo2Values[1]=new Array('10','20','30');
//combo1: first combobox's name
//combo2: second combobox's name
//formname: form's name
function setCombo2(){
for(i=0; i<combo2Text[mIndex].length; i++){
call this function on the onChange event of the combo1 in order to set the elements in the second combo. I assumed you will have two elements in the first combobox. If you have more element you should write the related array both for text and values of this element.
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.