FusionCharts Forum: SWFObject2 ( swfobject.js v 2) and IE Error - FusionCharts Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

SWFObject2 ( swfobject.js v 2) and IE Error IE producing "Object doesn't support this property or method" error

#1 User is offline   RationalRabbit 

  • Forum Newbie
  • Group: Members
  • Posts: 6
  • Joined: 28-March 09

Posted 04 June 2010 - 05:33 PM

Runs fine on FireFox, with no errors in the Error Console. Not so in IE 6, 7, 8.

Twice on each call, I receive the error "Object doesn't support this property or method".



We are creating an XML file, which is functioning fine, we are just switching to swfobject2 to get rid of previous flash detection that was causing serious problems in IE 6.



Flash detection works fine when Flash is disabled.

(majorversion, minorversion, revision: 8.0.0)



In the head:


	   var flashvars = {};

	   flashvars.dataXML = " {$XMLText;} ";

	   var params = {};

	   params.play = "true";

	   params.quality = "high";

	   params.wmode = "transparent";

	   params.bgcolor = "#FFFFFF";

	   params.allowfullscreen = "false";

	   params.allowscriptaccess = "always";

	   var attributes = {};

	   attributes.id = "Map2Div";

	   attributes.align = "middle";

      swfobject.embedSWF("FCMap_USA.swf", "AltContent", "520", "360", "{$FlashMajorVersion . '.' . $FlashMinorVersion . '.' . $FlashRevision;}", false, flashvars, params, attributes);





In the body:

Posted Image



Any insight would certainly be appreciated.



"The man to whom something can happen must first be willing to accept that his premises may be invalid." - Inspired by Leonard Cohen & Ayn Rand
0

Other Replies To This Topic

#2 User is offline   shamasis 

  • Red Flavoured
  • Group: Administrators
  • Posts: 179
  • Joined: 27-October 08
  • LocationKolkata, India

Posted 05 June 2010 - 04:11 AM

Greetings,



We are working on an updated FusionCharts.js and FusionMaps.js that incorporates swfObjecy v2.2 natively.



For this particular issue of yours, you need to send registerWithJS: '1' in your flashVars object.
0

Other Replies To This Topic

#3 User is offline   RationalRabbit 

  • Forum Newbie
  • Group: Members
  • Posts: 6
  • Joined: 28-March 09

Posted 05 June 2010 - 10:46 AM

Thanks, Shamasis, that's good to know.



One thing I found in my code above is that I was apparently placing the id in the wrong place (as an attribute). This was also causing errors.



My intention was to direct the swf to a particular div. I have failed to find a way to do this.



"The man to whom something can happen must first be willing to accept that his premises may be invalid." - Inspired by Leonard Cohen & Ayn Rand
0

Other Replies To This Topic

#4 User is offline   shamasis 

  • Red Flavoured
  • Group: Administrators
  • Posts: 179
  • Joined: 27-October 08
  • LocationKolkata, India

Posted 06 June 2010 - 12:40 AM

With swfObject2, doing it is a bit tricky.



Lets say you want to render your swf inside an element with if "map2Div" and your chart's ID you want to be "map2" the code would need to create a blank element inside map2Div with an id map2 and then render the chart in map2



var elm = document.createElement("span");

elm.setAttribute("id", "map2");

document.getElementById("map2Div").appendChild(elm);

swfobject.embedSWF("FCMap_USA.swf", "map2", "520", "360", "8.0.0", false, flashvars, params, attributes);

0

Other Replies To This Topic

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic