0
function AdminValidate()
    {
    if(document.getElementById("txtdate").value=="")
    {
    alert("PLEASE ENTER DATE...");
    return false;
    }

<asp:DropDownList ID="drpAgentId" runat="server" AutoPostBack="True" 
                onselectedindexchanged="drpAgentId_SelectedIndexChanged"  onchange ="return AdminValidate()" >

as in above code it works fine if txtdate is empty it alerts a but when textdate is not empty then it does nothing i mean i want to execute select query if txtdate is not empty and if txtdate is empty then show me a alert simple

3
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by dnanetwork
0

Does the onselectedindexchanged gets Fired ?

Place a BreakPoint on it and add a value so that the Javascript test can be true.

Edited by vuyiswamb: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.