A_tom Posted November 25, 2014 Posted November 25, 2014 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>
Ingolme Posted November 25, 2014 Posted November 25, 2014 Try setting <object> element's data attribute: <object data="../FusionCharts/Line.swf" ... You could also look for the SWFObject Javascript library.
A_tom Posted November 25, 2014 Author Posted November 25, 2014 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now