Sign in to follow this  
bomproapp

Hide Download Menu When Display On Iphone Or Disabled Flash Browser

Recommended Posts

Hi,

 

For export chat, is it possible to hide menu for downloading image at the top right of the chart only for the browser which disable flash or iPhone, iPad?

My purpose is to let user save the exported image only for the web browser which enabled flash.

I tried to use exportShowMenuItem='0' which is not work because it always hide the menu.

 

Please advise, thanks in advance.

bomproapp

post-29664-0-77389400-1348455059_thumb.jpg

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi,

 

You will have to write your own logic to detect if Flash player is enabled or not.

 

Once you find out if it is enable or not, you may use the setChartAttribute() function to update the attribute exportShowMenuItem.

 

Ref. Code:

<script type="text/javascript"><!--

 	var myChart = new FusionCharts( "Charts/Column2D.swf", "myChartId", "300", "240", "0", "1" );
 	myChart.setXMLUrl("Data.xml");
 	myChart.render("chartContainer");

 	function FC_Rendered(DOMId){
   	var chartReference = FusionCharts( "myChartId" );	// get chart reference
   	if(!FlashDetect.installed){
		chartReference.setChartAttribute( { "exportShowMenuItem" : "0"} );		// if Flash is disabled, set exportShowMenuItem to 0
	}else{
		chartReference.setChartAttribute( { "exportShowMenuItem" : "1"} );		// if Flash is enabled, set exportShowMenuItem to 1
	}         	
	}
	// -->
</script>

 

For the above logic to work, you will need the flash_detect.js file.

 

You may download the same from a third party link below,

http://www.featureblend.com/javascript-flash-detection-library.html

 

Hope this helps!

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