/    Sign up×
Community /Pin to ProfileBookmark

Hi There

I have alway been able to print an html page buy using the following:

[code=php]<a href=”javascript:window.print()”>Print</a>[/code]

I was wondering if there is a way to print a page but just go to the default printer without asking the user with the standord print box in IE. and if there is away to print a specific size such as 300px by 400px.

Does anyone know what i’m talking about! ?

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@AdamGundryFeb 11.2004 — AFAIK, you cannot bypass the print dialog with Javascript alone, for security reasons. After all, would you want to visit a webpage and suddenly have your printer spew out page after page of adverts?

You might be able to do something with ActiveX, but it probably wouldn't be worth it - most users wouldn't download the ActiveX control.

Adam
Copy linkTweet thisAlerts:
@RedheadauthorFeb 11.2004 — Thanks So Very Much I'm really gald to hear that ? I was just wondering that's about it
×

Success!

Help @Redhead 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.19,
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,
)...