Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Which method is used to enforce garbage collection in .net?

829


What are the merits and demerits of viewstate?

978


What is a multilingual website?

942


What is asp.net with mvc? : Asp.Net MVC

936


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?

1915


Explain the difference between AutoPostBack and IspostBack in ASP.NET?

1019


What is Web Server Control Templates.?

1012


What is the difference between WindowsDefaultLocation and WindowsDefaultBounds?

1115


Explain how caching in asp.net 2.0 is different from caching in asp.net 1.1?

922


What are the main differences between asp and asp.net?

979


What is the difference between user control and custom control?

880


What are the different properties of server control that exists?

1071


Explain the Order of events in an asp.net page?

964


What is the file through which you can customize your asp.net application?

1038


What is the difference between page.registerclientscriptblock and page.registerstartupscript?

800