Reputation: 11406
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.
It's saying 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.
Upvotes: 6
Views: 57461
Reputation: 11
Try setting the browser in compatibility mode - Tools, Compatibility View Settings, and select View all web sites in compatibility mode.
Upvotes: 1
Reputation: 21
I suggest don't wrap you jquery code with in $(document).ready(function(){
function. I have been also facing same problem after i comment that $(document).ready(function(){
it is working fine in all the browsers including IE 9 8 7 .
Upvotes: 2
Reputation: 11406
FINALLY!
It was an issue with a setTimeout. Apparently setTimeout(function, miliseconds, param1, param2, param3);
breaks in IE specifically.
SOURCE: http://arguments.callee.info/2008/11/10/passing-arguments-to-settimeout-and-setinterval/
Upvotes: 6