Here is the javascript validation code:
function ValidateFrom() {
if (document.getElementById("<%=txtCategoryName.ClientID %>").value.trim() == "") {
document.getElementById("<%=dvMessage.ClientID %>").innerHTML = "Please enter Category.";
document.getElementById("<%=txtCategoryName.ClientID %>").focus();
document.getElementById("<%=txtCategoryName.ClientID %>").classList.add("ErrorControl");
// document.getElementById("<%=txtCategoryName.ClientID %>").style.outline = '1px solid red';
// document.getElmentById("<%=txtCategoryName.ClientID %>").style.border = '3px solid red';
return false;
}
if (document.getElementById("<%=txtCategoryDescription.ClientID %>").value.trim() == "") {
document.getElementById("<%=dvMsg.ClientID %>").innerHTML = "Please enter Category Description.";
document.getElementById("<%=txtCategoryDescription.ClientID %>").focus();
document.getElementById("<%=txtCategoryDescription.ClientID %>").classList.add("ErrorControl");
// document.getElementById("<%=txtCategoryDescription.ClientID %>").style.outline = '1px solid red';
return false;
}
}
function checkfunction(val) {
if (val != "") {
document.getElementById("<%=txtCategoryName.ClientID %>").classList.remove("ErrorControl");
// document.getElementById("<%=dvMessage.ClientID %>").style.display = 'none';
document.getElementById("<%=txtCategoryDescription.ClientID %>").classList.remove("ErrorControl");
// document.getElementById("<%=dvMsg.ClientID %>").style.display = 'none';
}
}
Here is the text box:
Category Name *
Category Description *
Parent Category
Category Image
The problem is that validation not working properly... The ERROR MESSAGE having problem..
Midhun TpPosted Aug 19, 2016, 7:51 AM
Manoj MaharanaPosted Aug 20, 2016, 6:26 AM
Midhun TpPosted Aug 20, 2016, 6:23 AM
Manoj MaharanaPosted Aug 20, 2016, 6:10 AM
Midhun TpPosted Aug 20, 2016, 6:06 AM
Manoj MaharanaPosted Aug 20, 2016, 5:53 AM
Manoj MaharanaPosted Aug 20, 2016, 5:49 AM
Midhun TpPosted Aug 20, 2016, 1:54 AM
Manoj MaharanaPosted Aug 20, 2016, 1:41 AM
Midhun TpPosted Aug 19, 2016, 9:50 AM
Manoj MaharanaPosted Aug 19, 2016, 8:31 AM
Manoj MaharanaPosted Aug 19, 2016, 7:49 AM
Midhun TpPosted Aug 19, 2016, 7:42 AM
Manoj MaharanaPosted Aug 19, 2016, 7:34 AM
Midhun TpPosted Aug 19, 2016, 7:30 AM
Manoj MaharanaPosted Aug 19, 2016, 6:31 AM
Bikesh SrivastavaPosted Aug 19, 2016, 6:26 AM