I've researched the heck out of this. There are several posts on Stackoverflow about this already, but none seem to have an answer for me.
Like the other posts on here, it's working fine in Chrome or Firefox. But in IE 9, 8, 7, & 6 I get the same error. I've tried the hack where you force 9 into compatibility mode, but it doesn't resolve the issue.
Unable to get value of the property 'styleHelper': object is null or undefined, the irony is that if I – in IE 9 – type into the console
window.microstrategy.bone("W2552_Ctl").styleHelper it works and returns the function I need (that ID was created by the WYSIWYG, don't hate me).
Yes, everything is wrapped in a
$(document).ready. Yes, there are no typos. I do not get why IE hates this so much. Any help would be appreciated 🙂
The code in question is a simple variable declaration.
var ctlBone = window.microstrategy.bone(targetId + "_Ctl").styleHelper.ctlBone;
It appears that IE is trying to access that object right then and there rather than assign it.