I have a little javascript function which is attached to an onClick event of a button. It appears to work perfectly in Firefox(3.0.4), but both Opera(9.62) and IE fails to execute any other JS from the same .js file, including what normally works. The following function is the culprit:
function deleteComment(id){
$.post("ajax/comments.php", {delete: id},
function (reply) {
if (reply == "true") {
alert("Comment deleted!");
}
}
);
}
The Opera dev console says that there is a syntax error in the second line and that it expects a '}' in place of the first '{'. I assume it is the same problem for IE. Is this jQuery that fails to properly take care of the IE and Opera JS implementations or is my code faulty in some sense? I have a similar POST jQuery function in the file which works fine (when the above code is not there).