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
Which method is used to enforce garbage collection in .net?
What are the merits and demerits of viewstate?
What is a multilingual website?
What is asp.net with mvc? : Asp.Net MVC
i develop a web application and i gave security setting i.e autherization and athentication now it work properly on my local system , now question is ,is this security setting ie autherization and athentication which i gave in web.config will it be enough strong to secure my application on internet or i have to use some 3rd party tool or software to get security .if yes --how ? if no--what is the alternate?
Explain the difference between AutoPostBack and IspostBack in ASP.NET?
What is Web Server Control Templates.?
What is the difference between WindowsDefaultLocation and WindowsDefaultBounds?
Explain how caching in asp.net 2.0 is different from caching in asp.net 1.1?
What are the main differences between asp and asp.net?
What is the difference between user control and custom control?
What are the different properties of server control that exists?
Explain the Order of events in an asp.net page?
What is the file through which you can customize your asp.net application?
What is the difference between page.registerclientscriptblock and page.registerstartupscript?