In a page there is dropdown list with the name of the
cities like Bangalore,Pune,Chennai,Other and a text box
that would enable the user to enter the name of the city if
other is selected. How to enable validation on the text box
if other is selected
Answer Posted / deepak
just write a javascript function like this
on button click or on onkeypress event of text box
function validate()
{
if(document.getelementbyid("ur dropdownlist").value=="other")
{
if(document.getelementbyid("ur textbox").value=="")
{
alert("please enter city name");
return false;
}
}
}
and call like this onkeypress='return validate()'
Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Let's say I have an existing application written using vb6 and this application utilizes windows 2000 com+ transaction services. How would you approach migrating this application to.net?
Is there any limit for query string? Means what is the maximum size?
Give an example of cookie abuse.
What is the use of autowireup in asp.net?
What is the difference between globalization and localization?
Which is the parent class of the ASP.NET server control?
What are the asp.net security controls?
What are custom controls?
When we use cookie less session? Explain its working?
What is asp.net web pages?
What is the life cycle of web page?
What are the uses of list view control in Asp.net?
Can the dictionary object be created in client?s scope ?
What is the file extension of web service?
What are the differences between primary foreign and unique keys?