C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




How to alort a message when user not selected any checkbox.?


Posted Date: 22 Nov 2008      Total Responses: 2

Posted By: Rasmi Ranjan       Member Level: Silver     Points: 1



Hi All
How to alort a message when user not selected any checkbox out of checkbox list and press a button .Plz give me the sample coding.Thanks ...





Responses

Author: Deepika Haridas    22 Nov 2008Member Level: DiamondRating:     Points: 3

function validate()
{
if (document.getElementById('chkAll').checked==false)
{
alert("Invalid");
return false;
}
else
{
return true;
}
}



Thanks & Regards,
Deepika Haridas



Author: Appukuttan    22 Nov 2008Member Level: DiamondRating:     Points: 6

Hi..

<script type="text/javascript">
function checkForm(form)
{
var nCheck=0;
var checked = false;
for (n=0; n<form.length; n++)
{
if (form[n].type == 'Chk')
{
nCheck++;
}
}
for (i=1; i<nCheck; i++)
{
if(form.document.getElementById('ctl00_ContentPlaceHolder1_nCheck'+i).checked == true)
{
checked = true;
break;
}
}

if(!checked)
{
alert("you have to choose a any one option");
window.event.returnValue = false;
}
return checked;
}
function CallCircularToAll()
{
window.open('CircularToAll.aspx',null,'modal=1,height=300,width=500,status=no,location=no,directories=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=no,left=80,top=30,screenX=100,screenY=30');
}
function CallPersonwiseCircular()
{
window.open('Circular.aspx',null,'modal=1,height=300,width=450,status=no,location=no,directories=no,menubar=no,scrollbars=yes,copyhistory=no,resizable=no,left=80,top=30,screenX=100,screenY=30');
}
</script>



Post Reply
You must Sign In to post a response.
Next : can any body give me the details of microsoft dynamics trainging cetres in ?
Previous : problem in Sending email in asp.net
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use