-
17 Nov 2008 12:08 PM #1
[2.2] IE 7 Error with cssText assignment
[2.2] IE 7 Error with cssText assignment
We ran into an error on the ext-all.js. It gives us an error stating: 'invalid procedure call or argument'
I've debugged the problem and it turns out that on line 26 of ext-all.js there is a method:
For some reason F.cssText=G assignment is unable to be preformed. As if F.cssText was a private attribute. Any thoughts?Code:Ext.util.CSS=function(){var D=null;var C=document;var B=/(-[a-z])/gi;var A=function(E,F){return F.charAt(1).toUpperCase()};return{createStyleSheet:function(G,J){var F;var E=C.getElementsByTagName("head")[0];var I=C.createElement("style");I.setAttribute("type","text/css");if(J){I.setAttribute("id",J)}if(Ext.isIE){E.appendChild(I);F=I.styleSheet;F.cssText=G}else{try{I.appendChild(C.createTextNode(G))}catch(H){I.cssText=G}E.appendChild(I);F=I.styleSheet?I.styleSheet:(I.sheet||C.styleSheets[C.styleSheets.length-1])}this.cacheStyleSheet(F);return F}No longer a Newbie
-
17 Nov 2008 12:18 PM #2Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
Always debug using ext-all-debug.js!
Then you would have known that the actual line was:
Are you creating the stylesheet after the DOM is ready?Code:createStyleSheet : function(cssText, id){ var ss; var head = doc.getElementsByTagName("head")[0]; var rules = doc.createElement("style"); rules.setAttribute("type", "text/css"); if(id){ rules.setAttribute("id", id); } if(Ext.isIE){ head.appendChild(rules); ss = rules.styleSheet; ss.cssText = cssText; }else{
-
16 Jul 2009 12:31 PM #3
Condor, I'm using a user defined object called: Ext.ux.ManagedIFrame and the error is generating from this statement below:
Code:Ext.onReady( function(){ //Generate CSS Rules but allow for overrides. var CSS = Ext.util.CSS, rules=[]; CSS.getRule('.x-managed-iframe') || ( rules.push('.x-managed-iframe {height:100%;width:100%;overflow:auto;}')); CSS.getRule('.x-managed-iframe-mask')||(rules.push('.x-managed-iframe-mask{width:100%;height:100%;position:relative;}')); if(!CSS.getRule('.x-frame-shim')){ rules.push('.x-frame-shim {z-index:8500;position:absolute;top:0px;left:0px;background:transparent!important;overflow:hidden;display:none;}'); rules.push('.x-frame-shim-on{width:100%;height:100%;display:block;zoom:1;}'); rules.push('.ext-ie6 .x-frame-shim{margin-left:5px;margin-top:3px;}'); } CSS.getRule('.x-hide-nosize') || (rules.push('.x-hide-nosize,.x-hide-nosize *{height:0px!important;width:0px!important;border:none;}')); if(!!rules.length){ CSS.createStyleSheet(rules.join(' ')); } });No longer a Newbie
-
16 Jul 2009 12:37 PM #4
I think I just solved the issue, there was a !! in the last call there. Must be a typo.
NNo longer a Newbie
-
6 Dec 2012 3:13 AM #5
What do you mean with
"I think I just solved the issue, there was a !! in the last call there. Must be a typo."
Where was the bug? Was it in the style you had "!!" ... Which last call?
Did you fix ext-debug.js ... or was it in your code?
Please reply, because I have the same bug.... And is kind of stocked :-(


Reply With Quote