/    Sign up×
Community /Pin to ProfileBookmark

Avoiding Print Dialog Box

Hello,

I’m currently developing a web application for online pizza ordering. More specifically the customers “orders” screen.

I need to be able to print off receipts at a press of a button.

I currently acheive this by having a button which opens a popup window, which contains the relevant info pulled from the database with this js function:

[CODE]function win(){
window.print();
window.opener.location.href=”<? echo $file ?>”;
setTimeout(‘window.close()’,2);
window.focus();
//–>
}[/CODE]

This refreshes the window in which i came from and closes the popup receipt window once its printed.

My problem is the print dialog box, I’ve done some reading and i’ve seen alot of people saying that it can’t be avoided. However unlike some of the other people requiring a solution to this that don’t complete control of the enviroment the application is being used, i do.

The current browser i’m using for this application is Opera because the receipt printer that the client uses (STAR SP200) doesn’t seem to like IE7 one little bit and prints out incorrectly.

So basically is there [B]ANY[/B] way in which to acheive printing out with a single click of a link, avoiding the print dialog box?

Thanks for your time! ?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@felgallJun 13.2008 — I believe that there is a way to set up intranet settings for Internet Explorer that can arrange for a print command on the intranet pages to print directly to a specific printer. I have seen references to being able to do that but have never actually hunted down how to do it. As far as I am aware it is not possible for any other browser and not possible for pages on the internet rather than an intranet.
Copy linkTweet thisAlerts:
@Declan1991Jun 13.2008 — As far as I am aware it is not possible for any other browser and not possible for pages on the internet rather than an intranet.[/QUOTE]

Fortunately!
×

Success!

Help @copes spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.25,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...