the 'required field validator' should fireout immediately after i will come out of from the text box with out entering any text and it has to show error msg like enter some text into textbox like..
the validator should not fire out after button click..
hw it will happen,..help me out pls..
thanks..
Mukesh Kumar TiwariPosted Nov 9, 2013, 2:49 AM
function myfunction()
{
var txt_Value = document.getElementById("<%=txt_name.ClientID%>").value;
var pass = document.getElementById("<%=txt_pass.ClientID%>").value;
if (txt_Value == "")
{
alert("Enter Your Login Name");
document.getElementById("txt_name").focus();
return false;
}
else if (pass == "") {
alert("Enter Password first");
}
}
and call on button click like this...
i think its work for u....