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...

RequiredFieldValidator--write code in javascript

Answer Posted / amit das

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

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is viewstate in asp net with example?

989


What is the significance of proxy user?

1087


Explain the reason why the javascript validation not run on the asp.net button but run successfully on the html button?

1034


what cut off mark for po's,what questions they asked for interview?

1864


Explain the namespace classes used in asp.net mvc? : asp.net mvc

1000


What is the difference between Classic ASP and ASP.Net?

1106


calling result set one procedure to anothar procedure in sql2000

1774


What is another word for redirect?

949


Explain the role of global.asax?

997


Difference between response.redirect and server.transfer?

1031


What is the difference between web config and machine config files?

1013


What is a swagger in web api?

1058


Which two new properties are added in asp.net 4.0 page class?

930


Differentiate between globalization and localization.

986


To bind columns manually which tags do you need to add within the asp:datagrid ?

967