Homesick

blank output when printing div includes fusionchart

Recommended Posts

Dear Guys ,,

 

 

 

I am trying using JavaScript to print selective Div in the page which include a chart using this code:

 

 

 

 

 

var printContent = document.getElementById('popupContact');

 

var windowUrl = 'about:blank';

 

var uniqueName = new Date();

 

var windowName = 'Print' + uniqueName.getTime();

 

var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=200,height=200');

 

 

 

printWindow.document.write(printContent.innerHTML);

 

printWindow.document.close();

 

printWindow.focus();

 

printWindow.print();

 

printWindow.close();

 

 

 

where "popupContact" is the div element which includes the charts I want to print out ,,

 

 

 

When I do so,, the charts did not appear!!, but if I use print from file menu in the browser the chart appears no problem ,,

 

 

 

So please tell me how to handle it ??

 

 

 

Thanks

 

Homesick

Share this post


Link to post
Share on other sites
Guest Basundhara Ghosal

Hi,

Welcome to FusionCharts forum. :)

It seems that you are adding the HTML content along with the Div content which might create some problem in browsers like IE.

In that case you need to re-render the chart with inner HTML befor printing it.

Hope this helps.

Share this post


Link to post
Share on other sites
Basundhara Ghosal (8/23/2010)
Hi,

 

 

 

Welcome to FusionCharts forum. :)

 

 

 

It seems that you are adding the HTML content along with the Div content which might create some problem in browsers like IE.

 

 

 

In that case you need to re-render the chart with inner HTML befor printing it.

 

 

 

Hope this helps.

 

 

 

Dear Basundhara ,

 

 

 

Thanks a lot for your reply,

 

 

 

but please could you tell me where to re-render the chart in my code?

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