Jquery ajax call throws empty JS exception? <p>This function works on one page but not another. I've added all sorts of logging to try to find the error, but cannot. The output of this code on the broken page is:</p> <pre><code>[13:59:56.427] "here" [13:59:56.428] "beforesend: /admin/test.html?server=eferbelly&amp;port=24466&amp;username=akilandy&amp;password=vkjvkc9776A" [13:59:56.428] "fileName=undefined" [13:59:56.428] "lineNumber=undefined" [13:59:56.428] "columnNumber=undefined" [13:59:56.428] "here6" </code></pre> <p>That tells me it's getting into the exception handler, completely skipping my ajax() call, but it's not telling me the exception.</p> <pre><code>function test(server, port, username, password, spanId) { spanId = "#" + spanId; $(spanId).html("&lt;img src='/images/ajax-small.gif'/&gt;"); console.log("here"); try { $.ajax({ dataType: "json", type: "GET", url: "/admin/test.html?server=" + server + "&amp;port=" + port + "&amp;username=" + username + "&amp;password=" + password, success: function(json){ console.log("here2"); if (json.httpStatus == "200") { // Change the image to show success $(spanId).html("&lt;img src='/images/accept.png' title='success'/&gt;"); } else { console.log("here7"); // Change the image to show failure $(spanId).html("&lt;span style='color:#b22222;'&gt;" + json.httpStatus +"&lt;/span&gt;&amp;nbsp;&lt;img style='vertical-align: middle;' src='/images/cancel.png' title='placeholder'/&gt;"); } console.log("here8"); $(spanId).tooltip({ content: json.msg}); }, // Display the URL beforeSend: function(b,c,d) {console.log("beforesend: " + c.url);}, error: function(b,c,d) {console.log("here5");} }); } catch(e) { console.log(e); for (var i in e) console.log(i + "=" + i[e]); } console.log("here6"); } </code></pre> <p>What could I do further to debug this?</p> <p><strong>UPDATE: Output of code on a working page</strong></p> <p>Here's the output of the exact same code but on the page where it is working:</p> <pre><code>[15:01:20.158] "here" [15:01:20.159] "beforesend: /admin/test.html?server=eferbelly&amp;port=24466&amp;username=akilandy&amp;password=vkjvkc9776A" [15:01:20.159] "here6" [15:01:21.661] GET https://localhost/images/accept.png [HTTP/1.1 200 OK 2ms] [15:01:21.599] "here2" [15:01:21.600] "here8" </code></pre> <p>So it obviously gets through the ajax call with flying colors. No errors, nothing. How can I find the problem on the page where it doesn't work?</p>