Sign in to follow this  
Guest Rajroop

Export and Print functinalities not working in IE 8

Recommended Posts

Whenever click the export functionalities we call the following script. Here we pass the export type as parameter (Example : PDF and PNG)

function <portlet:namespace/>exportCharts(exportType)

  {

alert('exportType ::' + exportType + 'instanceName : ' + '<%=instanceName%>')

  //Get reference to chart.

  var chart = getChartFromId('<%=instanceName%>');

  alert('chart ::' + chart)

  // Now, we proceed with exporting only if chart has finished rendering.

  if (chart.hasRendered() != true)

  {

alert("Please wait for the chart to finish rendering, before you can invoke exporting");

  return;

  }  

  // call exporting function

  chart.exportChart( {exportFormat: exportType} );

  }

 

In the above Script we call "getChartFromId(InstanceName)". This method is I have mentioned below. 

 

/* Function to return Flash Object from ID */

infosoftglobal.FusionChartsUtil.getChartObject = function(id) /*here id is instancename*/

{

  var chartRef=null;

  if (navigator.appName.indexOf("Microsoft Internet")==-1) {

  if (document.embeds && document.embeds[id]){

  chartRef = document.embeds[id];}

 else

 {chartRef  = window.document[id];}

  }

  else {

  chartRef = window[id];

  }

  if (!chartRef){

 chartRef  = document.getElementById(id);}

return chartRef;

}

/* Aliases for easy usage */

var getChartFromId = infosoftglobal.FusionChartsUtil.getChartObject;

 

But I got error like  Object does not support this property or Method. This error occured in the first script(Marked in green color). So please guid me to solve this.

Share this post


Link to post
Share on other sites
Guest Rajroop

Hello,

 

 

 

Could you please make sure that the instanceName is unique?

 

 

 

Looking forward to your feedback on this. :)

Share this post


Link to post
Share on other sites

I have multiple charts in single page. So I have passed the charts instance name to export that particular charts. Instance name is unique here.

Share this post


Link to post
Share on other sites
Guest Rajroop

Hello Peris,

 

 

 

Could you please try exporting with Flash Player 10 when using IE? :)

 

 

 

If the above suggestion doesn't prove to be fruitful, could you please mail us at: [email protected] and share with us your complete running code and live examples/URL, if available i.e.?

 

 

 

:)

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