Home > flex > swfObject javascript error in Internet Explorer

swfObject javascript error in Internet Explorer

We’ve had this IE error reported 3 times this week:

Line: 130
Character: 4
Code: 0
Error Message: ’script.parentNode’ is null or not an object

The issue:
The SWFObject library is included multiple times on a page causing the IE DOM ready check hack it uses internally to be triggered multiple times. This hack inserts and removes a test node. Since the first instance removes this node, additional tries cause the error.

Solution:
Remove multiple imports of <script src=”swfobject.js” type=”text/javascript”></script> from your page.

Categories: flex Tags:
  1. April 15th, 2009 at 14:49 | #1

    Good catch!

  2. June 23rd, 2009 at 01:39 | #2

    i dont ust multiple but internet explorer give error

  3. Rockford
    December 4th, 2009 at 18:33 | #3

    Doh! Thank you.

  1. No trackbacks yet.