The following code is guilty of generating this unusual problem:
<script type="text/javascript">
$(document).ready(function () {
$('.deleteRow').click(function (event) {
event.preventDefault();
if (confirm('Delete?')) {
var $t = $(this);
$.post($(this).attr('href'), function (data) {
if (data) {
$t.parent().parent().remove();
}
});
}
return false;
});
});
</script>
Thanks in advance!
Here's the HTML:
<td> <%= Html.ActionLink("<-Delete", "Delete", new {quoteID = quote.QuoteID}, new {@class= "deleteRow"}) %></td>
<td> <a class="deleteRow" href="/Quote/Delete/56"><-Delete</a></td>
There we are.
<tbody>
<tr>
<td>
<p>
asd</p>
<div firebugversion="1.5.4" id="_firebugConsole" style="display: none;">
&nbsp;</div>
<br />
</td>
<td>
2345
</td>
<td>
7/28/2010 3:26:10 PM
</td>
<td> <a class="deleteRow" href="/Quote/Delete/56"><-Delete</a></td>
<script type="text/javascript">
$(document).ready(function () {
$('.deleteRow').click(function (event) {
event.preventDefault();
event.stopPropagation();
if (confirm('Delete?')) {
var $t = $(this);
$.post($(this).attr('href'), function (data) {
if (data) {
$t.parent().parent().remove();
}
});
}
return false;
});
});
</script>
</tr>
<tr>
<td>
Now is the time for all good men to come to the aid of their parties.
</td>
<td>
</td>
<td>
7/6/2010 10:13:44 PM
</td>
<td> <a class="deleteRow" href="/Quote/Delete/2"><-Delete</a></td>
<script type="text/javascript">
$(document).ready(function () {
$('.deleteRow').click(function (event) {
event.preventDefault();
event.stopPropagation();
if (confirm('Delete?')) {
var $t = $(this);
$.post($(this).attr('href'), function (data) {
if (data) {
$t.parent().parent().remove();
}
});
}
return false;
});
});
</script>
</tr>
<tr>
<td>
I'm a loser
</td>
<td>
146
</td>
<td>
7/6/2010 9:11:42 PM
</td>
<td> <a class="deleteRow" href="/Quote/Delete/1"><-Delete</a></td>
<script type="text/javascript">
$(document).ready(function () {
$('.deleteRow').click(function (event) {
event.preventDefault();
event.stopPropagation();
if (confirm('Delete?')) {
var $t = $(this);
$.post($(this).attr('href'), function (data) {
if (data) {
$t.parent().parent().remove();
}
});
}
return false;
});
});
</script>
</tr>
</tbody>
Thanks for all the responses, btw.