Click to See Complete Forum and Search --> : Print a file/image from a location (D:/images/abc.gif)


Ananda
01-07-2003, 03:22 AM
I have the following requirement.

From a popup window (html) , on click of a button, i need to print a file/image located on the System storage (d:/images/abc.gif).

Can this be acheived?

What is the approach? can any one help me with the Javascript code?

Thanks in advance for all the help!!

Cheers !!

Anandatirtha

AdamGundry
01-07-2003, 10:43 AM
As Dave said, you have to display the file first, so it's probably best to display it in a popup window, then call window.print(), like this:

PrintWindow = window.open("file://d:/images/abc.gif");
PrintWindow.print();

Of course, the user must have access to the file you open in the window. You might be able to (sort of) hide the popup using window.moveTo() or similar.

Adam