Sign in to follow this  
thaiduong

Can I keep current page on my browse when I run SaveAsImage.

Recommended Posts

HI

I am using php to coding. I change code in FusionChartSave.php to save image to server's directory.

// JPEG Header

//header('Content-type:image/jpeg');

// Force download box if not IE

//header('Content-Disposition: attachment; filename="FusionCharts.jpg"');

// JPEG Output with 100 quality

imagejpeg($chart, "ThePathToImage.jpeg", 100);

However, I have a problem because I don't change header for FusionChartSave.php page. So, my browser will go to FusionChartSave.php page intead of stay at current page (the page that show chart). I can use history.go(-1) to back to previous page but I think it's not good solution. Browser always blink the screen.

Any solution to avoid it?

Share this post


Link to post
Share on other sites

hello. I recently had this same desire: to save charts as images while NOT changing pages. I did find a way to do it, as well as find a way to allow the printing of multiple charts at the same time. The solution, at least the way I found to do it, is somewhat complex and involves several steps, but in the end it worked well for me. I took the time to do a very detailed blog post about it, and you can read it at http://www.dougboude.com/blog/1/2008/08/Printing-Multiple-FusionCharts-ChartsMaps.cfm

FusionCharts team, I do believe that the ability to print rendered charts is a need that many people frequently have. If there is anything you can put on your "to do" list that will make this process less painful, it would be very helpful! Such as, allow javascript to be passed to the printURL attribute, allow the ability to designate a popup window for the printURL action (it appears to be hardcoded to _self currently).

Thanks for a great product!

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