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] Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.