RequiredFieldValidator--write code in javascript
Answers were Sorted based on User's Feedback
Answer / srinivasan
function validate()
{
var Name = document.getElementById("txtName");
if( Name.value=="")
{
alert("Please enter the Name");
return false;
}
}
button OnClick() we hav to cal this function
Is This Answer Correct ? | 9 Yes | 1 No |
Answer / 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 |
Answer / gangadhar
function validate()
{
if(document.getElementById("NameId").value == null)
alert("Please enter the name");
document.getElementById("NameId").focus();
return false;
}
in button OnClick() we hav to cal this function
Is This Answer Correct ? | 6 Yes | 3 No |
What is web api and why to use it?
what is difference between const, static and readonly?
How can we create a website?
What is the difference between “Web.config” and “Machine.Config”?
How do you specify whether your data should be passed as Query string and Forms (Mainly about POST and GET)
What’s the catch?
what is the deference between dataset and data adapter?
Usage of web.configuration ?
What is difference between web api and web services?
I have one application, one user purchase some products in my application? and another person came he is also purchase some products?how can we identify which user purchase which items? my answer is by using session id? but i dont know how? can u give me programming for that?
Is global asax mandatory?
How do you change the session time-out value?
0 Answers TryTechnicals Pvt Ltd,