Asp.Net Basic Program

Posted by Abid Ali on Stack Overflow See other posts from Stack Overflow or by Abid Ali
Published on 2010-12-26T08:39:10Z Indexed on 2010/12/26 8:54 UTC
Read the original article Hit count: 236

Filed under:

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"; } }

© Stack Overflow or respective owner

Related posts about ASP.NET