//int mode
// mode = 0 invert selection
// mode = 1 select none
// mode = other than 0 or 1, select all
function checkChange(mode)
{
for(i=0;i<document.forms[0].elements.length;i++)
{
var ele = document.forms[0].elements[i];
if(ele.type == 'checkbox')
{
if(ele.disabled=false)
{
if(mode==0) //invert selection
ele.checked = !ele.checked;
else if(mode==1) //none
ele.checked = false;
else
ele.checked = true;
}
}
}
}
Wednesday, December 3, 2008
Javascript Snippet : Select All, None, Invert checkbox
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Hi all, Creating a modal popup for asp.net users is always easy, its simply a modal panel, modal popup extender of asp.net ajax and all is ...
-
// using DotNetNuke.Entities.Portals; // using System.Collections; PortalAliasController paController = new PortalAliasController(); PortalA...
-
I was configuring one of our clients farm which required FBA on different web applications (around 5) and he wanted each web application sho...
No comments:
Post a Comment
Please add your valuable comments about this post if it helped you. Thanks