I have configured the following iframe.
var iframe = $("<iframe style='display:none;' />");
When I change the src, the iframe loads, but I'm having a hard time catching the exception.
iframe.attr("src", url);
If I load the iframe with the 'load' function, it does catch the exception, but I need the code to be synchronous, not in ajax.
iframe.load(url, {}, function (data, status) {
// status will be error if an exception has been thrown
});
However, if I run the following example, I cannot get the status of the call.
iframe.load(function (param1, param2) {
// param2 will be empty
});