Reputation: 2360
Using jQuery, I add 2 attributes to an object element like this
$('#myObject').attr('codebase', pluginURL_IE);
$('#myObject').attr('onerror', 'InstallFailed();');
This code works on IE 7 and IE 8 but not in IE 9.
I inspected my tag using developer tools and found that the 'codebase' attribute is set and the 'onerror' attribute is not getting set in IE 9.
Any idea why I'm facing this problem only in IE 9? Thanks in advance.
Upvotes: 0
Views: 286
Reputation: 83
You could use the .error() event handler in jQuery. The following is an example
$('#myObject').error(function(){
InstallFailed();
});
Upvotes: 1