Check/Uncheck all checkbox

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everyone,
I know this is not the appropriate list for this question, but I was just
wondering if there's anyone in this list that can help me out here...

I want a checkbox that checks/unchecks all the other checkbox below it....
the following code works fine.... but If I replace the name of the
checkbox as an array (i.e. from 'check_list' to 'check_list[]' ) it doesnt
work....
I would really appreciate if anyone can help me out...

Here is my code:

====================================================================
====================================================================
<script language="javascript">
<!--

function MyCheck(chk)
{
if(document.myform3.Check_ctr.checked==true){
for (i = 0; i < chk.length; i++)
	chk[i].checked = true ;
}else{

for (i = 0; i < chk.length; i++)
	chk[i].checked = false ;
}
}

//  End -->
</script>

<form name="myform3" action="checkboxes.asp" method="post">
<input type="checkbox" name="Check_ctr" value="yes"
onClick="MyCheck(document.myform3.check_list)"><b>Check Control</b>
<br /><br />
<input type="checkbox" name="check_list" value="3">hello1<br>
<input type="checkbox" name="check_list" value="4">hello2<br>
<input type="checkbox" name="check_list" value="5">hello3<br>

</form>

=====================================================================
=====================================================================


thanks a lot for your help in advance..........

best
_sabs














> do u meant paging in php??? ...
>
>
>
>
> Thanks,
>
>      Reji,
>      PHP Developer.
>
>
>
>
> --- On Wed, 24/9/08, embroidtiger2008 <moinrazzaq@xxxxxxxxx> wrote:
> From: embroidtiger2008 <moinrazzaq@xxxxxxxxx>
> Subject:  How to make dynamic pagess in php??
> To: php-objects@xxxxxxxxxxxxxxx
> Date: Wednesday, 24 September, 2008, 7:23 PM
>
>
>
>
>
>
>
>
>
>
>
>             How to make dynamic pages in php??
>
>
>
> Any prctical example or or tutorial, plz guide me.
>
>
>
> MOIN
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>       Unlimited freedom, unlimited storage. Get it now, on
> http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/
>
> [Non-text portions of this message have been removed]
>
>



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux