I have a function creating a file for download like so:
header("Content-type: application/octet-stream");
header("Content-disposition: filename=file.csv");
print 'hello hello';
exit;
$this->nextFuntion();
I need the "nextFunction" to be called after the save dialogue pops up, I've seen various methods around here but they all have to do with header('location:') feature. Basicly the page where the function is called contains the data that goes inside the file. the "nextFunction" will erase the data form the page and return a message etc.
But the best I can do is get the download to work and no function.