madolia Posted August 3, 2006 Share Posted August 3, 2006 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] Link to comment https://forums.phpfreaks.com/topic/16403-createing-select-all-checkbox-using-for-loop-generated-radios/ Share on other sites More sharing options...
hostfreak Posted August 3, 2006 Share Posted August 3, 2006 Take a look at this javascript code: http://javascript.internet.com/buttons/check-all.html Link to comment https://forums.phpfreaks.com/topic/16403-createing-select-all-checkbox-using-for-loop-generated-radios/#findComment-68345 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.