how to cal javascript onselectedindexchanged in dropdown
how to cal javascript onselectedindexchanged in dropdown
source code
function sss()
{
var sure=document.getElementById("ctl00_ContentPlaceHolder1_TextBox8").value;
if(sure=="")
{
alert("Enter Suresh");
document.getElementById('ctl00_ContentPlaceHolder1_TextBox8').focus();
return false;
}
}
<table class="style1" width="100%" style="border-style: groove; border-width: thin">
<tr style="background: #1d599e; height: 10px;">
<td align="center" style="color:White" colspan="2">
PROJECT STATUS</td>
</tr>
<tr>
<td align="center" colspan="2">
<asp:Label ID="Label4" runat="server" style="font-size: 13px"
Text="Choose ProjectName to view the Status of the project"></asp:Label>
</td>
</tr>
<tr>
<td class="style10">
<asp:Label ID="Label11" runat="server" style="font-size: 11px"
Text="Date"></asp:Label> </td>
<td>
<asp:TextBox ID="TextBox8" runat="server" Height="15px" Width="175px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style10">
<asp:Label ID="Label12" runat="server" style="font-size: 11px"
Text="Name"></asp:Label> </td>
<td>
<asp:TextBox ID="TextBox9" runat="server" Height="15px" Width="175px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="style10">
<asp:Label ID="Label2" runat="server" style="font-size: 11px"
Text="Project"></asp:Label>
</td>
<td>
<asp:DropDownList ID="ddlprojectname" runat="server" Height="22px"
Width="180px" onclick="return sss()" onselectedindexchanged="ddlprojectname_SelectedIndexChanged">
<asp:ListItem Value="0">Select</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>