-2

I'm trying to fix this Data Analyzer script which generates flash charts, works fine in the Edge but bugs in chrome somehow by not showing the results.

(works in Chrome locally)

Can anyone please suggest me how to upgrade or fix this?

Cab
  • 11
  • 4
  • 1
    What script? You didn't include it in your question. And what does that link point to? Nobody should have to click a link to understand your issue. – David Makogon Oct 23 '17 at 04:02
  • swfobject.js https://www.codeproject.com/Articles/524736/Data-Analyzer-HTML-table-to-Chart – Cab Oct 23 '17 at 04:05
  • 1
    And what am I supposed to do with *that* link? That's now *two* links you've provided, and zero code **in your question**. Like I already stated: Nobody should have to click through to read code or understand what issue you're having. Please edit your question accordingly. – David Makogon Oct 23 '17 at 04:07
  • 1
    Add more details and code if possible! – Xenolion Oct 23 '17 at 04:13
  • Code is just way too big, i will try to add it somehow so it fits, basically there are 2 js files one is swfobject.js which generates swf and the other one is DataAnalyzer.js which injects data from html tables and handles graphs appearance in swf, along with single css file, results are generated in html – Cab Oct 23 '17 at 04:14

1 Answers1

0

To view your Flash content in Chrome, you have to do following steps:

1) Whilst on your page, click the green padlock icon in address bar.

2) Go to Flash settings and change from Ask (default) into Allow (for all future visits).

3) click Reload in the notification pop-up (or just refresh page).

This is because you're not directly embedding any Flash content (a .swf file) in the page, your DataAnalyzer.js is dynamically adding a div for the SWF later on with code like this:

var div = document.createElement('div');
div.id = "Chart" + count; div.className = 'chartCSS'; dest.appendChild(div);

chartType =  _ge('cmbChartType').value;
if(chartType == 'Random') { chartType = (Math.floor(Math.random()*2)) == 0 ? 'pie' : 'bar'; }

if(chartSrc == 'Flash Chart') 
{
window['myChart'+count] = new SWFObject("open-flash-chart.swf", div.id, this.chartHeight, this.chartWidth, "9", "#FFFFFF");
window['myChart'+count].addVariable("variables","true");
window['myChart'+count].addVariable('x_label_style','10,0x0000FF,2');
window['myChart'+count].addVariable("tool_tip", Charts[count].LabelX + ": #x_label#<br>" + (operation != -1 ? Charts[count].LabelY : 'Count') + ": #val#");
window['myChart'+count].addVariable((chartType == 'pie' ? 'pie' : 'bar_glass'), '50,#7E97A6');
window['myChart'+count].addVariable("title",Charts[count].Title + ',{font-size: 16px;}');

// ...etc etc...

}

This kind of dynamic embedding is also a trick used by malicious sites so it's blocked by default. If you have other end-users, then they too must do those 3 steps in their own Chrome browsers.

VC.One
  • 14,790
  • 4
  • 25
  • 57