C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » JavaScript »

How to create checkbox validation


Posted Date: 04 Jul 2009      Posted By: Macson      Member Level: Gold     Points: 1   Responses: 5



how to create checkbox validation




Responses

Author: Manigandan    04 Jul 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Hi Macson,

Consider for Example that user must check the box before he goes to next page,

Now you are going to validate it,


<script type="text/javascript">
function validate(form) {

if(!document.form1.agree.checked){alert("Please Read the guidelines and check the box below");
return false; }


return true;
}
</script>


Thanks,
Mani
http://manicse85.blogspot.com/



Author: R.Jaya kumar (JK)    04 Jul 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

hi

try this link

http://www.dotnetspider.com/resources/29957-CheckBox-Validates.aspx

Thanks and Regards
Jayakumar

Do not forget to Rate the post...



Author: Raj    06 Jul 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

Hi,

Try this,

function fnValidate()
{
var chk = docment.getElementById("chkId");
if(chk)
{
if(!chk.checked)
alert("validation message);
}
}

Thanks,
Raj



Author: Ramesh Sahu    06 Jul 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

///try this for check box Validation
function fnCheckboxChecked(obj)
{
var checked = obj.checked;
if (checked == true)
{
return true;
}
else
{
return false;
}
}

Thanking You

Ramesh Sahoo



Author: Devendra    06 Jul 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

<script type="text/javascript">
function validate(form) {

if(!document.form1.agree.checked){alert("Please Read the guidelines and check the box below");
return false; }


return true;
}
</script>



Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Javascript calender control
Previous : Dhtml popup problem
Return to Discussion Forum
Post New Message
Category: JavaScript

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use