Page 1 of 1

Accessing Internet temporary files with activex javascript

Posted: Sat Jul 04, 2009 10:19 am
by AlejoR
Hi, I created a small application using php and javascript for an Intranet, and it does the following:

1. The client fills a payment form, and submits it.
2. The server save the payment in mysql and it generates a file that needs to be printed in the client inmediately after they submit the form. (They want the file to be printed directly without prompting the window.print() dialog).
3. So I send the file to the client using an iframe (<iframe src='file.txt'>) but the problem is that I can't access the Internet temporary files folder with activex javascript.

I would do something like this if I could have access to the file.txt

Code: Select all

 
var wso = new ActiveXObject("WScript.Shell");
wso.Run('type file.txt > LPT1');
 
Notes.
a. It's programmed only for internet explorer, please don't ask me why.
b. The client has an EPSON FX-1170 printer so I have to use the "type" command to send the file directly to the printer in ascii mode.

Thanks in advance for your help.

Re: Accessing Internet temporary files with activex javascript

Posted: Sun Jul 05, 2009 1:01 pm
by JAB Creations
ActiveX? Are you kidding me? The other regulars are going to skin your hide if you keep asking those sorts of questions around here! I would too though I haven't made the switch (yet) to Linux.

Not that you're not welcome to though I doubt an open source loving community is going to have many pro-Microsofters running about. For that question try a different forum.