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 the difference between GridView and Repeater controls in ASP.NET?

1086


What do you mean by authorization?

922


To display data in the combo box, prior to setting the Data Source, what kind of property on a Combo Box do you set with a column name?

1047


What is GAC in ASP.NET 2.0

1153


Can I recieve both html markup for page and code in the asp.net web page's source code portion in the web browser?

925


What are session objects?

987


What are sessions and cookies?

966


What is the part of url?

972


What is redirecting behavior?

957


Which is better viewstate or session?

932


Describe the method to create a permanent cookie?

1076


What are tuples?

1123


How to disable validator control by client side JavaScript?

1043


where can i gather the materials for MCP certification

5276


Explain a program using code nuggets to create a simple application? : asp.net mvc

1045