Is there a way to send a file from server to client, without the Save as dialog box ?
What I'm trying to do is to send a file that I previously created in php (a report that the client requests), and then run in the client a javascript code like this:
var wshellobj = new ActiveXObject("WScript.Shell");
wshellobj.Run('type archivocreado.txt > LPT1');
I know what you could be thinking, but the client needs a report that has to be printed in a Epson FX-1170 in LPT1 port, in Ascii, and they say that they don't want the application to ask for confirmation before printing. They need that once the bill is done, it gets printed inmediately.
This is for a local network, using a web application created in php and mysql.
Thanks in advance.
PHP file download to client
Moderator: General Moderators
Re: PHP file download to client
Not using any standard method. It's insecure: what if I could automatically save a file to your computer called "C:\Windows\system32\user32.dll"? Oops, I just broke your Windows.AlejoR wrote:Is there a way to send a file from server to client, without the Save as dialog box ?
Also for printing: with JavaScript all you can do is pop up the print dialog.
Might be able to do those with Flash (have fun learning ActionScript) or ActiveX (which would only work on Windows and probably just with IE).
Re: PHP file download to client
In fact I have to use activex, and the application works only at IE, don't ask me why.
I can download the .txt file simply by embebbing it in a iframe, but I can't copy it or do anything with activex javascript to access this folder (temporary internet files).
Any help would be thanked.
I can download the .txt file simply by embebbing it in a iframe, but I can't copy it or do anything with activex javascript to access this folder (temporary internet files).
Any help would be thanked.