RadhikaVyas
asked on
Textbox validation using javascript for null value
HI
I want two sets of textboxes in two radio buttons click....I want to validate that textboxes in radio button check for nullability...whether textbox is null.....pls help.....Using javascript how to validate that textbox to check for nullability..
I want two sets of textboxes in two radio buttons click....I want to validate that textboxes in radio button check for nullability...whether textbox is null.....pls help.....Using javascript how to validate that textbox to check for nullability..
In the checkbox HTML set: <.... onclick="myFunction(this.n ame)">
Then insert this script:
<script language="JavaScript">
<!--
function myFunction(myFNM) {
if (document.getElementById(m yFNM).valu e == "") {
(your actionA)
} else {
(your actionB)
}
--> </script>
Is this what you intended to do...?
Then insert this script:
<script language="JavaScript">
<!--
function myFunction(myFNM) {
if (document.getElementById(m
(your actionA)
} else {
(your actionB)
}
--> </script>
Is this what you intended to do...?
you may use this also
var Str = document.getElementById(Tx tID).value
if (Str.length <= 0)
{
return false;
}
var Str = document.getElementById(Tx
if (Str.length <= 0)
{
return false;
}
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Check the below links that will help you:
http://forums.asp.net/t/1134282.aspx/1
http://stackoverflow.com/questions/3502354/textbox-empty-check-using-javascript
http://stackoverflow.com/questions/2986768/validating-a-text-box-value-using-javascript
http://www.webdeveloper.com/forum/showthread.php?t=172098
Jagdish D.