Categories > OpenTBS general >

How to send an message to the user after downloading

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Jules Mimeault
Date: 2013-04-24
Time: 23:24

How to send an message to the user after downloading

Hello,
I made a system that can make reports in Word or Excel format from data taken from a MySQL database.
The last command of my PHP script is:
$TBS->Show(OPENTBS_DOWNLOAD, $output_file_name);
Now I would like to send the user who just downloaded the file some information about the way to use this file.
I tried to add some javascript after this last command but to no avail.
I also tried to put a javascript alert just before the command $TBS->Show(OPENTBS_DOWNLOAD, $output_file_name);
But the result is: I get the alert correctly, but then the file is sent to the browser instead of being downloaded.

What would you suggest?
Thanks for your help.
By: Skrol29
Date: 2013-04-25
Time: 01:47

Re: How to send an message to the user after downloading Microsoft Office file

HTTP do not let you download and display a HTML page.
A download is an HTTP query apart, without other client content before and after.

In other words: you can make actions at the server side before and after the HTTP download, but not at the client side.