View unanswered posts | View active topics It is currently Thu Jul 24, 2014 8:38 am

Reply to topic  [ 6 posts ] 
 Javascript Error IE8 
Author Message

Joined: Fri Apr 13, 2012 1:59 am
Posts: 3
Post Javascript Error IE8
Hi guys.
I use in my Project but it don't work as it should.
An error ('null' is null or not an object) occurs only on 2 buttons on my website.
I used the uncompressed version for debugging a little bit and so i got that cs=null, but el.currentStyle isn't.

Here the Code from (starting at Row 1311)
* Get the raw CSS value for the target style
* @return {string}
getCss: cacheWhenLocked( function() {
var el = this.targetElement,
ctor = this.constructor,
s =,
cs = el.currentStyle,
cssProp = this.cssProperty,
styleProp = this.styleProperty,
prefixedCssProp = ctor._prefixedCssProp || ( ctor._prefixedCssProp = PIE.CSS_PREFIX + cssProp ),
prefixedStyleProp = ctor._prefixedStyleProp || ( ctor._prefixedStyleProp = PIE.STYLE_PREFIX + styleProp.charAt(0).toUpperCase() + styleProp.substring(1) );
return s[ prefixedStyleProp ] || cs.getAttribute( prefixedCssProp ) || s[ styleProp ] || cs.getAttribute( cssProp );
} ),

So please anyone who has an idea about this problem help me please.

Error_PIE_uncompressed.jpg [106.37 KiB]
Not downloaded yet
Wed Apr 18, 2012 12:02 am

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1441
Post Re: Javascript Error IE8
Can you put together a standalone testcase that triggers this error? There have been several users reporting this issue, but without a reliable way to reproduce the issue it is extremely difficult to implement a proper fix.

Wed Apr 18, 2012 9:49 am

Joined: Fri Apr 13, 2012 1:59 am
Posts: 3
Post Re: Javascript Error IE8
I don't think that i can make standalone testcase.
But i found the <div> (my toolbar) which throws the error but only on 2/4 buttons.

I'v got a main.css in my site which sets styles for this <div>:
#ToolBar1__div {
background-color: #FFFFFF;
-webkit-box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);

And i'v got a mainIE.css:
#ToolBar1__div {
box-shadow: 0px 4px 4px 0px rgb(200, 200, 200);
behavior: url(Skins/;

and on the .html site i referenced like this:
<link rel="stylesheet" type="text/css" href="Skins/main.css" />
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="Skins/mainIE.css" />

is there anything could have a problem with?

Thu Apr 19, 2012 11:54 pm

Joined: Wed Feb 02, 2011 6:14 pm
Posts: 12
Post Re: Javascript Error IE8
I am having a similar issue, and am unsure how to find the root cause.

    getCss: PIE.StyleInfoBase.cacheWhenLocked( function() {
        var el = this.targetElement,
            cs = el.currentStyle,

        // Don't redraw or hide borders for cells in border-collapse:collapse tables   
        if( !( el.tagName in PIE.tableCellTags && el.offsetParent.currentStyle.borderCollapse === 'collapse' ) ) {

The error I am getting is that IE8 cannot find the offsetParent of any THs in my table (in console-based debugging, offsetParent == null).

My understanding is that offsetParent is the closest parent element with a CSS 'position'.

I tried adding position:relative to my table element in the CSS file, but this did not help.

I imagine that I could add a check for el.offsetParent to PIE.js, but would prefer to avoid hacking this file if possible, hence I've been trying to find the situation in which the bug occurs, but as this is a CSS + JS heavy site it is not a straightforward task.

Things are being hidden and shown on the problematic page, so I wonder if the CSS 'position' is being removed by jQuery at some point.

Another interesting twist is that I don't actually have any PIE applied to my TH elements, so it seems strange that PIE wants to do anything with the parent table.

Will post again if I get any closer to the cause.


Mon Apr 23, 2012 5:13 pm

Joined: Wed Feb 02, 2011 6:14 pm
Posts: 12
Post Re: Javascript Error IE8
Hi again,

I created a test case but could not reproduce the issue so am parking this for now.

However, I discovered that my TH elements did have a PIE style applied in a global stylesheet, but this was disabled (via behavior:none !important) in a page-specific stylesheet.

Removing the PIE styling from THs in the global stylesheet resolved my issue.

Perhaps this gives a clue as to how to resolve this?


Mon Apr 23, 2012 5:44 pm

Joined: Fri Oct 11, 2013 5:42 pm
Posts: 1
Post Re: Javascript Error IE8
I've got a repeatable test case, but I'd rather not post the code to the public. How do I get you the files to recreate the error?

Fri Oct 11, 2013 5:48 pm
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: Google [Bot] and 6 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.