Asp.Net Basic Program
- by Abid Ali
I want to Visible the combo Box named Cities when i click the Country Pakistan.. but the combo box visibility remains Hidden.. how do i do so ? I think my Code is correct but it is not working :s .. Help Required..
<select id="Items" name = "Countries">
<option id="Pakistan" onclick="VisibileTrue()">Pakistan</option>
<option id = "Taiwan">Taiwan</option>
</select>
<select id="Items2" name="Cities" style="display:none" >
<option>Karachi</option>
<option>Sindh</option>
</select>
</div>
</form>
function VisibileTrue()
{
var element = document.getElementById(Pakistan);
if(element == Pakistan)
{
var element2 = document.getElementsByTagName("Items2");
element2.style.display = "inline";
}
}