Jump to content
Sign in to follow this  
A_tom

Flash not working in Firefox, but ok elsewhere

Recommended Posts

This code runs ok in Chrome and IE, but not Firefox. How to fix?

<!DOCTYPE html><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">        <meta name="viewport" id="viewport" content="target-densitydpi=high-dpi,initial-scale=1.0,user-scalable=no" />        <title>Document Title</title>        <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>        <script  type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>        <script type="text/javascript">$(function(){    //option 1    insertme('LineChart');    });            function insertme(ref) {//this can be placed in external js file                var join = "";                join += '<object type="application/x-shockwave-flash" width="500" height="300">';                join += '<param name="movie" value="../FusionCharts/Line.swf" />';                join += '<param name="FlashVars" value="&dataURL=clientFTP/' + ref + 'MoTrnd.xml&chartWidth=500&chartHeight=300">';                join += '<param name="quality" value="high" />';                join += '<embed src="../FusionCharts/Line.swf" flashVars="&dataURL=clientFTP/' + ref + 'MoTrnd.xml&chartWidth=500&chartHeight=300" quality="high" width="500" height="300" id="Line" type="application/x-shockwave-flash"  pluginspage="http://www.macromedia.com/go/getflashplayer" />';                join += '</object>';                $('#dumphere').append(join);            }        </script>        <style type="text/css">        </style>    </head>    <body>    <h1>The chart goes here</h1>        <div id="dumphere">           <!--<script> ///option 2 - just remove comment tags                insertme('LineChart');            </script>-->        </div>    </body></html>

 

Share this post


Link to post
Share on other sites

Try setting <object> element's data attribute:

<object data="../FusionCharts/Line.swf" ...

You could also look for the SWFObject Javascript library.

Share this post


Link to post
Share on other sites

Try setting <object> element's data attribute:

<object data="../FusionCharts/Line.swf" ...

You could also look for the SWFObject Javascript library.

That works. Thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×