how can we use this script function in the other script function;
First;
<script type="text/javascript">
$(function () {
//Hide label after 5 secs
setTimeout(function () {
$("[id$=lblError]").fadeOut("slow");
}, 5000);
});
</script>
<asp:Label ID="lblError" ForeColor = "Red" runat="server" Text="Name is required."></asp:Label>
Second ;
<script type="text/javascript">
function ValidateDropDown() {
var value = document.getElementById('<%=TextBox1.ClientID%>').value;
var value2 = document.getElementById('<%=TextBox2.ClientID%>').value;
var ddlVal = document.getElementById("DropDownList1").selectedIndex;
if (value == "" && (ddlVal == 0) && (value2 == "")) {
alert("Lütfen bir kriter seçiniz..");
return false;
//}
}
else {
//alert("The selected value is : '" + document.getElementById("DropDownList1").value + "'");
alert("Başarıyla yönlendiriliyorsunuz..");
}
}
</script>
in the;
if (value == "" && (ddlVal == 0) && (value2 == "")) {
*******************************I want to run first script function in here
alert("Lütfen bir kriter seçiniz..");
return false;
//}