Accessing Internet temporary files with activex javascript

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
AlejoR
Forum Newbie
Posts: 6
Joined: Wed Apr 22, 2009 1:39 pm
Location: Colombia

Accessing Internet temporary files with activex javascript

Post 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.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Accessing Internet temporary files with activex javascript

Post 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.
Post Reply