尽管我希望有人说“改变这行代码来阅读......”,但我真的想知道Firefox没有报告破解代码的问题的解决方案。此代码块被破坏,导致前一个代码块中断。它位于notdupe.live.click函数中的某个位置。我可以注释掉整个函数,其余代码也可以。我试过评论片断但不能隔离问题。
<script type="text/javascript">
var SaveDupeGroup = 0;
var DupeCount = 0;
var ReInitAnswer = '';
var RemoveAnswer = '';
$(document).ready(function () {
$('.StartOver').live('click', function () {
ReInitAnswer = confirm('Are you sure you want TO DELETE ALL temp dupe records AND start over FROM SCRATCH? \nIt may take a couple OF hours.');
if (ReInitAnswer) {
// submit the form TO BEGIN re-creating the temp table
document.forms["dupeIndivs"].submit(); //return true;
} else {
alert('canceled');
return false;
}
});
$('.notdupe').live('click', function (e) {
$.ajax({
type: "POST",
url: "cfc/basic.cfc?method=SetNotDupe",
data: "indivNum=" + $(e.target).val() + "&SetValue=" + $(e.target).is(":checked"),
error: function (xhr, textStatus, errorThrown) {
// show error
alert(errorThrown);
},
success: function (response1, textStatus, jqXHR)(
if ($(e.target).is(":checked")) {
$firstTD = $(this).parent().siblings().first();
SaveDupeGroup = $firstTD.text();
$.ajax({
type: 'GET',
url: 'cfc/basic.cfc?method=CheckDupeGroup&returnformat=json',
dataType: 'json',
data: 'DupeGroupNumber=' + $firstTD.text(),
error: function (xhr, textStatus, errorThrown) {
// show error
alert(errorThrown);
},
success: function (response, textStatus, jqXHR) {
DupeCount = response.DATA[0];
alert('Dupe Group-' + SaveDupeGroup + ' count=' + response.DATA[0]);
if (DupeCount) {
alert('huh?');
} else {
RemoveAnswer = confirm('All of the names in this group have been checked.\nDo you want to remove them from the lists?');
if (RemoveAnswer) {
alert('continued');
} else {
alert('canceled');
return false;
}
}
}
});
})
});
});
});
</script>