问题
I am using force download component to get download the file.
I want to show success flash message on the same page once the user accept it to save otherwise want to show an error message on that page.
First thing, Is it possible to track the save dialog event (not confirmed if it is) and if it is then how I can achieve it?
回答1:
This link might help you. You can open the new tab after submitting the form. And use $this->autoRender = false;
at the end of your controller's action and use force download component to download the requested file.
回答2:
Open it in a new tab and use your force download component.
来源:https://stackoverflow.com/questions/11338343/force-download-file-in-cakephp-2-1