while validating dropdownlist,on focus event will open dropdown list
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
i am using the following code to open dropdown list while validating,but the problem is that i am increasing size of DDL so that it looks like it is opened but by doing so it disturbs the formatting of all those controls which are below to it,so can you plz give a good code or suggestion for opening dropdown list on button click while validating.
function ddl_focus() { if(document.getElementById("<%=DropDownList1.ClientID %>").value=="0") { document.getElementById("<%=DropDownList1.ClientID %>").focus(); open_ddl(); } } function open_ddl() { document.getElementById("<%=DropDownList1.ClientID %>").size=10; } function close_ddl() { document.getElementById("<%=DropDownList1.ClientID %>").size=1; }
<Select> Agra delhi mumbai chennai Plz select from ddl