Help - trying to code Select All for checkbox array
Posted: Sun Feb 07, 2010 1:23 am
Hi there. This is my first post, most definitely won't be my last.
I'm rather new to php so please excuse me if this is kind of a noob question (I tried searching).
I have a messenger inbox that puts a checkbox next to each message. To delete them all you have to manually check each checkbox and then hit the submit button to delete.
I'm trying to code a "Select All" button that will select all of the checkboxes at once.
This is the existing code for the messenger form.
This is a sample I've been working with that I thougth might work.
Thanks much for any help you may be able to offer
I'm rather new to php so please excuse me if this is kind of a noob question (I tried searching).
I have a messenger inbox that puts a checkbox next to each message. To delete them all you have to manually check each checkbox and then hit the submit button to delete.
I'm trying to code a "Select All" button that will select all of the checkboxes at once.
This is the existing code for the messenger form.
Code: Select all
$u2uheader
<form method="post" action="u2u.php?action=delete">
<table cellspacing="0" cellpadding="0" border="0" width="$tablewidth" align="center">
<tr> <td bgcolor="$bordercolor">
<table border="0" cellspacing="$borderwidth" cellpadding="$tablespace" width="100%">
<tr><td class="header" colspan="5" align="center">$lang_textu2uinbox</td></tr>
<tr>
<td class="header">$lang_textdeleteques</td>
<td class="header">$lang_textsubject</td>
<td class="header">$lang_textfrom</td>
<td class="header">$lang_textsent</td>
<td class="header">$lang_u2ureadstatus</td>
</tr>
$messages
</table>
</td></tr></table><br />
<input type="hidden" name="folder" value="$folder">
<input type="submit" name="alldel" value="$lang_textsubmitchanges">
</form>
$u2ufooterCode: Select all
<input type="button" name="Check_All" value="Check All"
onClick="CheckAll(document.myform.check_list)">
<input type="button" name="Un_CheckAll" value="Uncheck All"
onClick="UnCheckAll(document.myform.check_list)">Thanks much for any help you may be able to offer