/    Sign up×
Community /Pin to ProfileBookmark

avoid print dialog box

Hi all,
I am searching for JavaScript code to avoid the print dialog box that pops-up when we print any webpage.

I had a solution for this in vbscript , but that is not acceptable to client. Can anyone suggest me how to go about it or any pointers to do this in JavaScript or any other web technologies?

Thanks in advance.

Shailen

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@TeufelJun 02.2008 — No, that is not possible, and that's OK that way. I don't want to webpages to make my printer go empty, would you?
Copy linkTweet thisAlerts:
@felgallJun 02.2008 — How would your page know which of my printers I want to print to unless it displays the dialog to ask me?
Copy linkTweet thisAlerts:
@shailenauthorJun 03.2008 — @fellgal it should take the default printer set.

the vbScript I was talking about works like that.

Atleast we should have a setting on the browser to allow such features for some trusted sites, if not by JavaScript like languages.
Copy linkTweet thisAlerts:
@Declan1991Jun 03.2008 — The idea behind a web browser is that you are isolated from the web. JavaScript is not allowed to interact with your computer (except JScript using ActiveX and that is IE only, and disabled by default) and shouldn't be. While your site may be trusted, how is the browser to know that. A lot of things like that can be set, such as changing the statusbar text, resizing windows etc.
×

Success!

Help @shailen 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.5,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...