Wrox Home  
Search P2P Archive for: Go

  Return to Index  

html_code_clinic thread: Re: how to check all the checkboxes


Message #1 by Doubts Master <clearmydoubts@y...> on Wed, 5 Dec 2001 21:47:16 -0800 (PST)
Hi Tim,

You can write a javascript function for selecting all
the checkboxes in the page.

function chkall() 
{
	for(var i=0;i<document.forms[0].elements.length;i++) 
	{
		if(document.forms[0].elements[i].type=="checkbox") 
		{
				document.forms[0].elements[i].checked=true; 

		}
	}
}


All the best,
Mahesh



--- Tim Zhang <tzhang@h...> wrote:
> Hi:
> 
> I have a page with many checkboxes.  I'd like to add
> a "select All" button 
> for user to select all the selections.  How can I do
> it?
> 
> I am using IE5.5.
> 
> Thanks!
> 
> clearmydoubts@y...
> $subst('Email.Unsub')
> Read the future with ebooks at B&N
>
http://service.bfast.com/bfast/click?bfmid=2181&sourceid=38934667&categoryid=rn_ebooks


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

  Return to Index