i want to validate a label by using displayed text
if the label showedtext is "yes" ------nothing to do
if the label showedtext is "no"--------notify the user the text in label is no
-----------thanks advance----------------
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
SUNIL GUTTAPosted Feb 10, 2014, 9:32 AM
if(document.getElementById("label1").value.Trim()=="no")
{
Alert("label1 content is NO do something");
}
//else is not necessary just because u don't want to do anything .......
Regards
Jaganathan BantheswaranPosted Feb 8, 2014, 7:21 AM
if($('.yourlabel').val() === 'yes'){
//do something
}else{
}
What is your problem here?
Post your code....