Facing an issue with IE and jquery. The code is working in all other browsers but breaks when used in IE. Fairly simple implementation. But I am javascript novice.
console.log('hi ie');
jQuery(document).ready(function () {
setTimeout(function () {
jQuery(".controlApply").on("click", function (event) {
pollVisibility();
console.log('after poll');
});
}, 1000);
});
//This method checks is a specific div is shown. Dirty way to check if a report is being processed
function pollVisibility() {
console.log('poll');
if (microstrategy.bones.rwb_viewer.objectID == '7647F4F611E2B39B923E0080EF058C78') {
if (!jQuery('#divWaitBox').attr('style')) {
console.log('divWaitBox');
//wait did not appear
microstrategy.getViewerBone().commands.exec('refresh');
} else if (jQuery('#divWaitBox').attr('style').indexOf('hidden') != -1) {
console.log('hidden');
microstrategy.getViewerBone().commands.exec('refresh');
} else {
console.log('other');
setTimeout(pollVisibility, 800);
}
} else {}
}
The console.log never is called however the document.ready seems to work in IE
The doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
If its wrong, I cannot change it. This is an extension of the MicroStrategy BI application.