Hi @compstuden
You have done syntax erros at many places.
Refer this code
HTML
<div>
<asp:DropDownList ID="ddlFinalAction" runat="server">
<asp:ListItem></asp:ListItem>
<asp:ListItem>A</asp:ListItem>
<asp:ListItem>B</asp:ListItem>
<asp:ListItem>C</asp:ListItem>
</asp:DropDownList><br /><br />
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
<br />
<br />
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="return Validate()" />
</div>
Javascript
<script type="text/javascript">
function Validate() {
if (document.getElementById('<%=ddlFinalAction.ClientID%>').selectedIndex == 0) {
alert('Mus Enter Final Action Taken');
return false;
}
if (document.getElementById('<%=ddlFinalAction.ClientID%>').selectedIndex == 1 || document.getElementById('<%=TextBox5.ClientID%>').value.length > 0) {
alert('Must Enter Comment');
return false;
}
return true;
}
</script>