Write a code for "RequiredFieldValidator" in java script
Answer Posted / rajikiran
function validate()
{
if(document.getElementById("NameId").value == null)
alert("Please enter the name");
document.getElementById("NameId").focus();
return false;
}
or
function validate()
{
with(document.formname)
{
txtboxid.value == ""
alert("Please enter value");
txtboxid.focus();
return false;
}
}
or we can use
document.form.txtboxid.value
instead of
document.getElementById("NameId").value
regards
rajikiran
Is This Answer Correct ? | 7 Yes | 3 No |
Post New Answer View All Answers
Name the method that needs to be invoked on the dataadapter control to fill the generated dataset with data?
Why session management is required?
How many types of file extensions for razor views in ASP.Net MVC?
Define tracing.
Why do we need master page in asp.net?
What is the server of asp.net?
What is the use of asp.net web api?
Will the asp.net validators run in server side or client side?
Are there any resources for drop-in replacements for the default css that comes with the ASP.NET Website template?
What is the latest version of asp.net?
What do you mean by caching in asp.net?
Please brief not about xsd,xslt & xml?
IN an ASP.NET Web application if there is any error, how can you debug?
What are html helpers in asp.net?
Is it possible to apply themes to an asp.net application? If yes, then how?