Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
Empty Text Box Validation Not Working
satheesh kumar
Apr 12 2016 11:02 PM
475
Reply
OnClientClick="return Validate()"
function Validate()
{
console.log("kkkk");
alert("pppp");
var pgng = document.getElementById("ContentPlaceHolder1_txtUsername").value.trim();
alert(pgng=='');
console.log(pgng);
if (document.getElementById("ContentPlaceHolder1_txtUsername").value.trim() == '') {
alert('The textbox should not be empty...');
document.getElementById("ContentPlaceHolder1_txtUsername").focus();
return false;
}
return false;
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
to create multiple pie chart in jsp
How to check if string contains certain word in JScript