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

I'm also very interested in knowing if a solution exists, it seems like the charts have the ability to post their data asynchronistically so why not add the option to prevent the redirect?

 

 

 

For now I'm using a concauction of iframes to do the job.

Edited by Guest

Share this post


Link to post
Share on other sites

For this, we'll have to modify the code of chart to just send the data and not redirect. We'll try and implement that in the next version.

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