开发者

SWfObject.embedSWF and Flash inside Form IE Problem

开发者 https://www.devze.com 2023-02-06 09:30 出处:网络
I\'m using the great Open Flash Chart v 2.0 to do some char on a dashboard. All my charts work perfectly on Firefox and Chrome but I\'m facing a huge problem on IE.

I'm using the great Open Flash Chart v 2.0 to do some char on a dashboard.

All my charts work perfectly on Firefox and Chrome but I'm facing a huge problem on IE.

Since the client uses WebForms all my pages are surronded, via Master Page on a [form] tag.

Threre seems to be a problem when flash objects are put inside a form tag on IE. I've googled a lot trying to find a way to solve this and found swfFormFix2. This seems to work on already placed [object/embed] tags. But on my case I'm case i'm using SWfObject.embedSWF anbd it falis.

Sample Code: swfobject.embedSWF("open-flash-cha开发者_开发知识库rt.swf", "my_chart", "450", "200", "9.0.0");

<form id="aspnetForm" name="aspNetForm">
    <div id="my_chart"></div>
</form>

Can anyone help me ?


After a lot of searching on the net I finally came accross a post on google groups, wich I don't have the link right now, that instructed people with this kind of problem to update to the latest version o flash player. The PC we were testing the application had flash player 9.0.0 installed and we did an update to version 10.1.100XX (flash's latest version) and the problem has gone away.

So I didn't find a way to make this work on older versions of Flash player but since I have no problem on adding the latest version as a requirement of our system in production, since this is an Intranet app, I'm happy with this solution.

If someone knows how to make this work on older versions of Flash Player, please send an answer.

Thanks.

Hope this helps someone.


Might be helpful.

Just fixed the following problem of swfobject.embedSWF( ... ) in IE.

After passing xml string in flashvars object to be parsed by SWF all browsers except IE processed it and displayed data.

Strangely enough replacing double quotes in xml string by single quotes solved the problem. After that all major browsers display content provided by xml data correctly.


Have you tried the solution in the SWFObject FAQ?

Quoting the FAQ:

function fixReference() {
    window["mySwfId"] = document.forms[0]["mySwfId"];
}
swfobject.addDomLoadEvent(fixReference);
0

精彩评论

暂无评论...
验证码 换一张
取 消