marconiduarte / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

IE8 Invalid argument #312

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. loaded the page http://test.bettershop.ro/
2.
3.

What is the expected output? What do you see instead?
Only in IE8 (tested with FF, IE6, IE6, Chrome, Safari, Opera and it works)
I receive the exact same error for every swf on my page
Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0;
SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET
CLR 3.0.30618)
Timestamp: Tue, 19 May 2009 21:13:30 UTC

Message: Invalid argument.
Line: 5
Char: 7210
Code: 0
URI: http://test.bettershop.ro/swfobject.js

Message: Invalid argument.
Line: 5
Char: 7210
Code: 0
URI: http://test.bettershop.ro/swfobject.js

What version of the product are you using? On what operating system?
SWF Object 2.1
IE 8
Vista

Original issue reported on code.google.com by vladzinc...@gmail.com on 19 May 2009 at 9:16

GoogleCodeExporter commented 9 years ago
The problem was that the divs had an id with the firs character a number. If I 
put a
letter first it works!

Original comment by vladzinc...@gmail.com on 19 May 2009 at 9:46

GoogleCodeExporter commented 9 years ago

Original comment by bobbyvandersluis on 21 May 2009 at 9:12

GoogleCodeExporter commented 9 years ago
Why was the status of this bug set to Invalid?

I've been racking my brain lately trying to figure out why flash hasn't been 
working
on about 30+ sites I have that use swfobject.  Thanks you to the user who found 
the
bug (and a temporary workaround).  I was using java UUIDs for all of my unique 
id
values (Note: Using a number for an ID value is valid x/html).

Can this put on the bug list of items to be addressed?  Is it something not 
fixable?
 (meaning: yet "another" IE8 bug not conforming to standards).  At this point I have
to go and change a lot of code (putting hacks into them) to get this working on 
all
of my clients' websites (All of my content objects use UUIDs for unique 
identifiers.
 I'm going to have to do something ugly like prefixing them with the letter "a" and
remember to pull them out later so that they match the database).

Thoughts?

Original comment by warloo...@gmail.com on 24 May 2009 at 4:06

GoogleCodeExporter commented 9 years ago
RE 3: It simply isn't a bug. According to the specs an ID has to start with a 
letter.
And even if it would be a bug, it would be for the IE team to fix, there is 
nothing
we could do about it, we're just using simple DOM references. So your solution 
is the
easiest; just live with it and carry on ;-)

Original comment by bobbyvandersluis on 24 May 2009 at 6:33

GoogleCodeExporter commented 9 years ago
unfortunately, I have the same "invalid argument" errors in IE8 even if my div 
ids 
are starting with a letter.  I am already using SWFObject v2.2.  The temporary 
solution I did was to put a try-catch block on the code of the swfobject that 
generates the error which is at line 4, character 7665 of the original 
SWFObject 
v2.2.  The modified part of the code looks like this:

try {
    n.addRule(ac,Y)
} catch(e) {}

Original comment by roaniver...@gmail.com on 24 Jul 2009 at 6:57

GoogleCodeExporter commented 9 years ago
same here. getting the error for a div who's id begins with an underscore _

Original comment by idotz...@gmail.com on 6 Aug 2009 at 2:00

GoogleCodeExporter commented 9 years ago
same error .. when will this be fixed ?

Original comment by michaelg...@googlemail.com on 10 Sep 2009 at 8:29

GoogleCodeExporter commented 9 years ago
@michaelgr383

PLease read the previous comments

It won't be fixed (by us) as it is not an issue with swfobject. Take it up with 
the 
IE team or name your divs correctly.

Original comment by aran.rhee@gmail.com on 11 Sep 2009 at 4:50

GoogleCodeExporter commented 9 years ago
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; 
GTB6.3; 
MS-RTC LM 8; AskTB5.5)
Timestamp: Wed, 30 Dec 2009 07:19:28 UTC
Message: Invalid argument.

This works in every other browser except IE8.
Have been scratching my brain for a long b4 viewing this link.
This error is for the window.open() function.

Original comment by catchsa...@gmail.com on 30 Dec 2009 at 7:22

GoogleCodeExporter commented 9 years ago
This issue is actually not only limited to ids that start with non-standard 
characters, 
but also ids that contain the period character, for example:

title-10.0

This kind of an id is standards-compliant (ID and NAME tokens must begin with a 
letter 
([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), 
hyphens ("-"), 
underscores ("_"), colons (":"), and periods (".")), according to w3c. 

Original comment by m...@aptual.fi on 25 May 2010 at 11:04

GoogleCodeExporter commented 9 years ago
Same problem here with my div id="Player"

I get an Invalid error and when looking further in debug mode step by step it 
seems when the swfobject reads all attributes to compare their type to 
"function" it cause this error when it met the DOM attribute: TEXT_NODE ...

So I am obliged to change the swfobject source code to add a try/cath...

Original comment by nadirmer...@gmail.com on 6 Aug 2010 at 9:04

GoogleCodeExporter commented 9 years ago
yes, vladzinculescu you're right, the container div had a number in its id 
value. thank you for the tip. ie8 sucks!!!

Original comment by phantom...@gmail.com on 22 Dec 2010 at 8:17

GoogleCodeExporter commented 9 years ago
Salesforce generates IDs with colons like "j_id0:j_id28:j_id29:flashContent". 
Legal as verified by @M but like "title-10.0" SWFObject errors inside:

createCSS("#" + id, "visibility:" + v);

Why? Because they're invalid selectors:

#j_id0:j_id28:j_id29:flashContent
#title-10.0

Mine interprets as multiple pseudo-selectors and @M's interprets "0" as an 
errant class selector. I found the fix documented at jQuery a while back. These 
characters simply need backslash-escaped.

// Match every period or semicolon and precede it with a literal backslash.
createCSS("#" + id.replace(/[.:]/g, "\\$&"), "visibility:" + v);

This specific case is a bug.

Original comment by tol...@dnalot.com on 29 Nov 2011 at 8:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Getting the error You need Flash player 6+ and JavaScript enabled to view this 
video.
Using google chrome latest versions of everything except joomla at
Joomla 1.7 (module also 1.7)...

Original comment by krazynap...@gmail.com on 13 Feb 2012 at 12:20