Jump to content

Archived

This topic is now archived and is closed to further replies.

madolia

createing "select all" checkbox using for loop generated radios

Recommended Posts

I have this code which genetares radio buttons using a loop with $i the variable. what i want to do is to create another "select all" button so that when a user clicks, it automatically selects all either approved or reject radio buttons. How to do that?
[code]if(($rowPS["STATUS"] == "") && ($rowLAST["OWNER"] == "-"))
{
echo"
<td align=center><input type=radio name=appr[$i] value='Approved' style=background:#FFFFFF></td>
<td align=center><input type=radio name=appr[$i] value='Rejected' style=background:#FFFFFF></td>";
}
<td colspan=6 align=center>Approve All Request ?  <input type='checkbox' name='a1r1' value='Yes' style=background:#FFFFFF onClick='yesALL()';>Yes</td>[/code]

Share this post


Link to post
Share on other sites
Take a look at this javascript code: http://javascript.internet.com/buttons/check-all.html

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.