Sign in to follow this  
mokalovesoulmate

IE8 auto-export to server JavaScript Problem

Recommended Posts

Hello,

 

 

 

I have a page that using auto-render then export to server method to make a report.

 

 

 

The script works perfectly almost all major browsers (FF, Chrome, Safari, Opera, IE6, IE7) but not IE8.

 

 

 

Here is my script (I get it from this forum too and currently using it)

 

 

 

function FC_Exported(exporStatus)

{

   //seving the name of the exported image in a variable seperated by ';'

   //here we use the substring function to deduct the domain name from file location

   returnValue += exporStatus.fileName+';';

   //Counting the number of chart exported by increasing this variable

   exportedCharts++;



   //checking the Status of the export and set the variable 'allExportOK' as false if there has any error

   if(exporStatus.statusCode != '1') allExportOK = false;



   //when all charts are exported give a messege whether there has any error or not?

   if(exportedCharts == totalCharts) {

       //if there is no error then we call a function show_popup() to marge all the exported image into one image

       if(allExportOK == true) show_popup();

       else alert("All Charts Are Not Exported Successfully. You cannot export to PDF because the charts is still not complete. Please contact Administrator.");

   }

};

 

 

 

If I execute code above on all browsers (FF, Chrome, Safari, Opera, IE6, IE7) the charts are exported successfully, but in IE8 it will display error as stated by "else alert" at the code above. In short, it fails.

 

 

 

I am using the FusionCharts Developer Edition.

 

 

 

Any solution?

 

 

 

Thanks!

Share this post


Link to post
Share on other sites
Guest Rajroop

Hi,

 

 

 

We will be testing on this issue.

 

 

 

Could you please pass on your relevant code for us to be able to replicate this issue in our Labs? This would help in coming to a solution effectively.

 

 

 

Also, please attach a snap shot of the error encountered.

 

 

 

Looking forward to your reply. :)

Share this post


Link to post
Share on other sites

Ok, here you go :

 

 

 

This is the execution code :

 


var totalCharts = 2;

var exportedCharts=0;

var allExportOK = true;

var returnValue="";

var intervlId = {};

var chartObjects = {}

/**

*  This function is called by every chart when it is fully rendered.

*  Upon rendering, we initiate the exporting of the chart.

*

*/

function FC_Rendered(DomID) {



   chartObjects[DomID] = getChartFromId(DomID);

   intervlId[DomID] = setInterval(function() {CheckRender(DomID);}, 10);

};



function CheckRender(DomID) {

  //If this Properties are True that means the Chart Became Updated

  if(chartObjects[DomID] && chartObjects[DomID].hasRendered && chartObjects[DomID].hasRendered()){

      window.clearInterval(intervlId[DomID]);

      //exporting the chart

      chartObjects[DomID].exportChart();

  }

};



/**

*  This Function is will be called after exporting chart with its results.

*  this function is decleared as a exportCallback atribute in the charts xml.

*/

function myCallBackFunction(exporStatus)

{

   //seving the name of the exported image in a variable seperated by ';'

   //here we use the substring function to deduct the domain name from file location

   returnValue += exporStatus.fileName+';';

   //Counting the number of chart exported by increasing this variable

   exportedCharts++;



   //checking the Status of the export and set the variable 'allExportOK' as false if there has any error

   if(exporStatus.statusCode != '1') allExportOK = false;



   //when all charts are exported give a messege whether there has any error or not?

   if(exportedCharts == totalCharts) {

       //if there is no error then we call a function show_popup() to marge all the exported image into one image

       if(allExportOK == true)  alert("All Charts Are Exported Successfully.");

       else alert("All Charts Are Not Exported Successfully.");

   }

};

 

 

 

That's all.

 

 

 

I hope I can get quick reply from you, Thanks!

 

 

 

Moses Kurniawan

Edited by Guest

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