PDA

View Full Version : Invalid argument in IE 6 and IE7



McLuck
24 Jun 2009, 3:59 PM
Before anything, sorry for my English.
I am Brazilian and I do not speak very well English.

I have a problem. I am using a grid.
It works perfectly in any browser, except in IE6 and IE7
(works in 8).

clicking to open it, it gives the following error:

Invalid argument.
Debugging, I saw that line where the error occurs is:

ext-all.js


this.innerHd.firstChild.style.width = this.getOffsetWidth ();


and its consecutive:


this.innerHd.firstChild.firstChild.style.width = e;
this.mainBody.dom.style.width = e;



Can you help me with this?

Thank you and I apologize again for bad English spoken.

aconran
24 Jun 2009, 5:36 PM
This exception typically occurs in IE when you try to set a negative width or height on an element.

There are a number of fixes which are available in SVN which resolve an issue that was triggering this issue.

McLuck
25 Jun 2009, 10:40 AM
This exception typically occurs in IE when you try to set a negative width or height on an element.

There are a number of fixes which are available in SVN which resolve an issue that was triggering this issue.

Grateful for the speed in responding.

Can I ask to explain how I use it or where can I find material to make this correction?

I do not know much EXTjs. It is something new in my applications.

tryanDLS
25 Jun 2009, 10:50 AM
The fix will be in the next RC build. Or, you can purchase a support subscription to get SVN access. http://extjs.com/store/extjs/#support-table

Gareth Bult
11 Aug 2009, 6:14 AM
Whereas I appreciate the need to generate revenue, after just purchasing a developer's license and writing my first App - I've now come to supply it to my client. He is of course using IE6 and the App (of course) doesn't work.

Whereas I would expect to wait for fixes to IE8, Chrome etc, IE6 has been around for rather a long time and given you're quoting compatibility with IE6 on the website (!) and given a rather small first app comes back with "Invalid Argument", well, let's just say it would be rather nice to get access to any available fixes sooner rather than later.

Failing that -
(a) do you have a date for the release of these fixes?
(b) do you think displaying "IE6" in the compatibility table is fair?

[my app works on FF 2.x,3.x and IE8]

Condor
11 Aug 2009, 6:17 AM
Are you still experiencing this error with the Ext 3.0.0 Final release?

Gareth Bult
11 Aug 2009, 6:26 AM
The app was written with 3.x release .. (!)
(my ext folder is ext-3.0.0)

Initially I had a trailing comma problem which meant the initial instantiation of my class was failing .. now however it's giving me "invalid argument" and the script debugger is hanging so I've no clue as to where the problem is ...

[this is on a 'clean' win2k system]

Condor
11 Aug 2009, 6:27 AM
Can you post the config you use to create this grid?

Gareth Bult
11 Aug 2009, 6:28 AM
No idea beyond;
"Line 8, Char 45679"

tryanDLS
11 Aug 2009, 6:31 AM
(b) do you think displaying "IE6" in the compatibility table is fair?


Are you serious?? Do you think any software works 100% with all supported browsers?

While this may be a 'bug' that's fixed, as Aaron says if you're setting a negative height/width, there's going to be problems and you probably have an issue with your code. Since you haven't posted any code per http://extjs.com/learn/Ext_Forum_Help we can't really say for sure.

Per the latest blog post http://extjs.com/blog/2009/08/10/ext-js-30-be-outstanding/, Ext is moving toward a more formalized release scheduling, including quarterly patch releases.

Gareth Bult
11 Aug 2009, 6:36 AM
Ok, now I'm running off -debug, I have line 5328 which reads;

this.setOpacity(value)

Does this help?

Condor
11 Aug 2009, 6:42 AM
1. You should really post your code. Without it we are just guessing.
2. You should also post a stack trace and not only the failing line.

Gareth Bult
11 Aug 2009, 6:59 AM
In -debug, commenting out the following lines enables my app to run;

//style == 'opacity' ? ^M
// this.setOpacity(value) : ^M
// this.dom.style[chkCache(style)] = value;^M

These are 5327 through 5329.

Gareth Bult
11 Aug 2009, 7:01 AM
I would need to go through and cut out the crap until I got something that worked, there's no point in you guys sifting through stuff if that's what is required.

If I could get a stack trace I'd post it.. if you can tell me how given it hangs the IE script debugger before it actually generates any screen output, I'm all ears... hopefully the about post should help ?

Gareth Bult
11 Aug 2009, 7:15 AM
Well the fix broke some formatting, this works better;


try {
style == 'opacity' ? ^M
this.setOpacity(value) : ^M
this.dom.style[chkCache(style)] = value;^M
}
catch(err) { }:)

Sample is currently visible at;
http://test.ukcareers.co.uk/

.. plain text source can be pulled from the header if it's useful.
.. currently it's running on IE6 with the above patch .. seems ok for now although if you've any clue as to what sort of think might activate this code I could probably spot the cause fairly quickly .. ?

Condor
11 Aug 2009, 7:27 AM
I see you are using the jQuery adapter. Can you check if fixing this bug (http://extjs.com/forum/showthread.php?p=364787#post364787) helps?

Gareth Bult
11 Aug 2009, 7:47 AM
Customer is looking atm, will try it after-hours .. although it doesn't "feel" like the same issue ... (!)

mathieuj
22 Mar 2010, 3:59 AM
Well the fix broke some formatting, this works better;


try {
style == 'opacity' ? ^M
this.setOpacity(value) : ^M
this.dom.style[chkCache(style)] = value;^M
}
catch(err) { }:)

Sample is currently visible at;
http://test.ukcareers.co.uk/

.. plain text source can be pulled from the header if it's useful.
.. currently it's running on IE6 with the above patch .. seems ok for now although if you've any clue as to what sort of think might activate this code I could probably spot the cause fairly quickly .. ?

I also bumped into this bug using 3.1.0 with ext-adapter, inserting the fix proposed by Gareth corrected it.

It generated an invalid argument at the lines specified above.

I suppose this bug will also arise in 3.2.0 the lines in question have not changed (didn't checked in SVN).

Do you know if this could be corrected ?

It's difficult for me providing a full bug report with limited test case, the issue existing in a big ExtJS App.

Mathieu

dodikuswono
2 Jun 2010, 7:35 PM
Yes, this bug still arise in 3.2.1. Thanks for correction.

mrusinak
28 Jul 2010, 1:45 PM
Using 3.2.2, I run into this problem on 27665 of ext-all-debug.js when using my site in IE8's compatibility mode. The code is in onResize of Ext.list.ListView, and the relevant snippet is:


if(Ext.isNumber(h)){
bdp.style.height = (h - hd.parentNode.offsetHeight) + 'px';
}


Using IE8's Developer Tools, I see that 'h' is 11 and 'hd.parentNode.offsetHeight' is 22 when this happens, so it's definitely due to negative height setting. Outside of compatibility mode it works fine.

I was wondering if there was a fix already for this, or if not, what should my override do - force to 0 if negative, or something else?

Thanks for any help!

Condor
28 Jul 2010, 10:04 PM
Ext doesn't support IE8 compatibility mode. Use IE8 strict or quirks mode instead.

mrusinak
29 Jul 2010, 10:18 AM
Ext doesn't support IE8 compatibility mode. Use IE8 strict or quirks mode instead.

The doctype of my page is set to strict. I just turn on compatibility mode in IE8 to get useful line numbers of problems for IE7. Just running the code in IE7 produces the same problem at the same place (so it's not a compatibility mode issue).

I was just wondering what would be the correct override - force to 0 if negative? Or something else?

SharpDog
16 Dec 2010, 10:29 AM
I'm having the same problem as gareth and mathieu described from 11-april-2009 through 22-march-2010. We're on the ext 3.3.1 and using FF 3.6 and IE 8. Works fine in FF as FF forgives the omitted argument (animation) while IE apparently does not.

Pachat
21 Dec 2010, 9:13 AM
I also experience the Invalid argument under IE 6 but when !important is included in the style.


Ext.Element.addMethods(function(){
.../...
return {
.../...
setStyle : function(prop, value){
.../...

/* To prevent error under IE when style == "height" value=="20px !important" */
if (Ext.isString(value)) value = value.replace(/!important/g, '');
style == 'opacity' ?
this.setOpacity(value) :
this.dom.style[chkCache(style)] = value;
The hack in bold makes it run Ok under IE.