Strange jQuery error?
Strange jQuery error?
I am deploying a new part of our website, and everything was working fine while I was deving on my local machine.
After uploading the scripts, Firebug returns an error but it is not at all descriptive of what it doesn't like.
The error says:
- $(
- Cancel: function () { <filename><line number>
Does anybody have any suggestions of what this might mean?
The error happens when you click the "edit" button next to a row, and a jQuery dialog pops up.
The line number points to where the Cancel button is defined:
- $("#dialog-contract-edit").dialog({
modal: true,
width: (document.documentElement.clientWidth * .8),
buttons: {
Ok: function() {
//if ($("#editContractExpire").val() )
$.ajax({
type: 'post',
url: 'ajax/saveContract.php',
data: {
'id' : id,
'firstName' : $("#editFirstName").val(),
'lastName' : $("#editLastName").val(),
'phoneNumber' : $("#editPhoneNumber").val(),
'emailAddress' : $("#editEmailAddress").val(),
'contractExpire' : $("#editContractExpire").val()
},
cache: false,
success: function(contractSave) {
//$("#dialog").html("");
$("#dialog-contract-edit").dialog("close");
location.reload();
},
error: function() {
alert("Could not save the contract!");
}
});
},
Cancel: function() {
$("#dialog-contract-edit").dialog("close");
}
}