Click to See Complete Forum and Search --> : drop down list


piertiong
11-17-2003, 06:58 AM
hi there,

is it possible(if yes, how do i go about doing it) to create a drop down list with 3 options, eg, A, B and C.

and when i select A or B, nothing happens.

but when i select C, another drop down list(values from database) appears beneath it.

then i select an option from the new drop down list, and another drop down list appears below it with options according to the value of the previous drop down list.

sorry if i did not ask the question clearly.

thanks.:)

Khalid Ali
11-17-2003, 07:20 AM
what you will need to do is test for values you do not want to d anything something like this

var listbox=document.formName.listBoxName;
var val = listbox.options[listbox.selectedIndex].value;
if(val=="B" || val=="C"){
//do nothing
}else{
// show other listbox.
}


checkout this link to see how you can create a second listbox on the fly (http://www.webapplikations.com/pages/html_js/forms/DropDownSelectCountryShowCities.html)

piertiong
11-17-2003, 08:10 AM
thanks for your kind reply. will try to do it.