Bootstrap Modal Confirmation
<p>I've got a table that displays user details per row along with a Remove button that launches a Bootstrap modal confirmation dialog box.</p>

<p>My goal is to have the confirmation button trigger an event which will delete that particular user.  </p>

<p>How would I pass jsmith22 from the table row into my Javascript function?</p>

<p><strong>HTML Table</strong></p>

<pre><code>&lt;tr&gt;
    &lt;td&gt;jsmith22&lt;/td&gt;
    &lt;td&gt;John Smith&lt;/td&gt;
    &lt;td&gt;555-555-5555&lt;/td&gt;
    &lt;td&gt;test@gmail.com&lt;/td&gt;
    &lt;td&gt;&lt;button type="button" class="btn btn-default btn-lg btn-block roster-button active" data-toggle="modal" data-target="#removeUser"&gt;Remove&lt;/button&gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p><strong>Modal dialog</strong></p>

   

<pre><code>&lt;div aria-labelledby="myModalLabel" class="modal fade" id="removeUser"
role="dialog" tabindex="-1"&gt;
    &lt;div class="modal-dialog" role="document"&gt;
        &lt;div class="modal-content"&gt;
            &lt;div class="modal-header"&gt;
                &lt;h4 class="modal-title"&gt;Remove Employee&lt;/h4&gt;
            &lt;/div&gt;
            &lt;div class="modal-body"&gt;
                &lt;p&gt;Are you sure you wish to remove this user?&lt;/p&gt;
            &lt;/div&gt;
            &lt;div class="modal-footer"&gt;
                &lt;button class="btn btn-default" data-dismiss="modal" type="button"&gt;Cancel&lt;/button&gt;
                &lt;button class="btn btn-danger" id="remove-button" type="submit"&gt;Remove&lt;/button&gt;
            &lt;/div&gt;
        &lt;/div&gt;&lt;!-- end modal-content --&gt;
    &lt;/div&gt;&lt;!-- end modal-dialog --&gt;
&lt;/div&gt;&lt;!-- end modal --&gt;
</code></pre>

<p><strong>Javascript</strong></p>

<pre><code>// Remove button event trigger
$('#remove-button').click(function() {
        $.post('/API/removeUser', {} );
});
</code></pre>