How do I prevent a ListView Split Button link from calling the default action?

How do I prevent a ListView Split Button link from calling the default action?

jQuery-1.4.1, jQuery Mobile, ASP.net, MVC 2.0


I'm using an anchor tag <a> in a list for deleting an object.  The anchor href is dynamically set and acts as a split button.  I want to pop up a dialog to confirm the delete before it's executed.  The problem is that no matter what I return from the confirm dialog, the default action (ie. href link) is ALWAYS getting called.  I stripped my code down to the basics shown below.  Why doesn't 'returning false' prevent the href from being executed?


<div data-role="content">

<ul data-role="listview" data-split-icon="delete-icon">

<% foreach (MvcApplication.Models.PastVisitListModel item in Model.PastVisitList)

{ %>

<li>

<h3>

                                  <%= Html.ActionLink(item.FirstName + " " + item.LastName, "Complaint", "PastVisit", new {patientId = item.PatientId, visitId = item.VisitId}, null)%> </h3>

                           <p class="ui-line-aside">

                                  DOB: <%= item.DateOfBirth.ToShortDateString() %> </p>

                           <p class="ui-line-aside">

                                  Visit Date: <%= item.DateOfVisit.ToShortDateString()%> </p>

 

                           <a id="deleteLink" onclick="return confirm('Are you sure you want to delete?');" href="<%= Url.Action("Delete", "PastVisit", new {id = item.VisitId}) %>" >Delete</a>

                     </li>

              <% } %>

       </ul>

</div>


To point out the problem even further, why would the href (ie. controller/action) be executed in the following code:

  1. <a id="deleteLink" onclick="return false;" href="<%= Url.Action("Delete", "PastVisit", new {id = item.VisitId}) %>" >Delete</a>


I've tested this code on another button (that wasn't in a list and wasn't a split button) and it works as I expected.  So I'm lead to believe it's due to the listview or split button.