process hidden field with jquery and calculate
<p>I have an html table I've updated to use checkboxes to be able to delete multiple files:</p>

<pre><code>&lt;table&gt;
    &lt;thead&gt;
    &lt;tr&gt;
        &lt;th&gt;Camera Name&lt;/th&gt;
        &lt;th&gt;Date Created&lt;/th&gt;
        &lt;th&gt;Video Size&lt;/th&gt;
        &lt;th&gt;Video Length&lt;/th&gt;
        &lt;th&gt;
            &lt;button type="submit" class="deletebutton" name="delete_video" value="Delete" title="Delete the selected videos" onClick="return confirm('Are you sure you want to delete?')"&gt;Delete&lt;/button&gt;&lt;br&gt;
            &lt;input type="checkbox" name="radioselectall" title="Select All" /&gt;
        &lt;/th&gt;
    &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;

 &lt;?php

for($i=0;$i&lt;$num_videos;$i++)
{
       //do stuff
       //Note: I'm looping here to build the table from the server
?&gt;              
        &lt;tr &gt;
            &lt;td onclick="DoNav('&lt;?php echo $url; ?&gt;');"&gt;
                        &lt;?php echo $result_videos[$i]["camera_name"]; ?&gt; 
            &lt;/td&gt;
            &lt;td onclick="DoNav('&lt;?php echo $url; ?&gt;');"&gt;
                        &lt;?php echo setlocalTime($result_videos[$i]["video_datetime"]); ?&gt; 
            &lt;/td&gt;
            &lt;td onclick="DoNav('&lt;?php echo $url; ?&gt;');"&gt;
                        &lt;?php echo ByteSize($result_videos[$i]["video_size"]); ?&gt;
            &lt;/td&gt;
            &lt;td onclick="DoNav('&lt;?php echo $url; ?&gt;');"&gt;
                &lt;?php echo strTime($result_videos[$i]["video_length"]); ?&gt;
            &lt;/td&gt;
            &lt;td&gt;
                &lt;form name="myform" action="&lt;?php echo htmlentities($_SERVER['REQUEST_URI']); ?&gt;" method="POST"&gt;
                &lt;input type="checkbox" name="radioselect" title="Mark this video for deletion"/&gt;
                &lt;input type="hidden" name="video_name" value="&lt;?php echo $result_videos[$i]["video_name"]; ?&gt;" /&gt;
                &lt;/form&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
</code></pre>

<p>I started with first creating some jquery code to create a select all/deselect all button in the table heading and just a test to show I can find which boxes are checked.  That all works:</p>

<pre><code>//selectall checkboxes - select all or deselect all if top checkbox is marked in table header
$("input[name='radioselectall']").change(function()
{
    if( $(this).is(':checked') )
    {
        $("input[type='checkbox']","td").attr('checked',true);
    } 
    else
    {
        $("input[type='checkbox']","td").attr('checked',false);
    }
});

//process checkboxes - which ones are on 
$(".deletebutton").click(function() {
    $("input[name='radioselect']:checked").each(function(i){
        alert(this.value);
    });
});
</code></pre>

<p>So the part where I'm stuck is I don't know where to go from here.  I need to pass all the video_names of all the videos selected (with the checkboxes).  <code>video_name</code> is part of a hidden field in my form.  So I need to pass that to my php function when the delete button is selected.  Not really sure how to tackle this.  Hope this makes sense.</p>
