HomeASP.NET Dynamically add content to one Dropdownlis...
Dynamically add content to one Dropdownlist on the basis of selection of other Dropdownlist
function FillCity() { str = document.all["MyDropDownList"].value ; document.all["DropDownList"].length=0; soption = "Select City" st = new Option(soption,""); document.all["DropDownList"].add(st) for (i=1;i
Contributed by aspfree Rating: / 34 August 11, 2002
<script language="JavaScript" > function FillCity() { str = document.all["MyDropDownList"].value ; document.all["DropDownList"].length=0; soption = "Select City" st = new Option(soption,""); document.all["DropDownList"].add(st) for (i=1;i<8;i++){ if (JCountry[i] == str){ soption = JCity[i]; st = new Option(soption,soption); document.all["DropDownList"].add(st) }