javascripthtmlruby-on-railsflashopen-flash-chart

How do I get the "Install Missing Plugin" yellow bar to appear in firefox when flash is not installed?


My rails website uses the open_flash_graph plugin to generate flash graphs for my clients. If a customer doesn't have flash installed, it doesn't display any messages, it simply doesn't show any graphs.

I've noticed that if I go to other websites that need flash, I get a yellow bar at the top of my firefox window that offers to "Install Missing Plugin".

I assume something in the HTML lets firefox know that this webpage needs flash. What code do I need to add to my website to make this work?


Solution

  • When you use the open_flash_chart_object function the forth parameter is use_swfobject. By default this is set to true, which causes the chart to degrade very gracefully if flash is not installed. If you set this parameter to false, then the "Install Missing Plugin" message will get triggered.