/    Sign up×
Community /Pin to ProfileBookmark

Print dialog?

how do I make the print dialog pop up in javascript?

to post a comment
JavaScript

10 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliJun 12.2003 — <input type="button" value="Print" onclick="window.print()">

this should do it...?
Copy linkTweet thisAlerts:
@PselusauthorJun 12.2003 — tried it.

tried javascript:window.Print()

tried javascript:window.showPrintDialog()

tried javascript:window.printpage()

tried javascript?rint()

tried em all.......they all say the "object doesn't support this method or property"
Copy linkTweet thisAlerts:
@Khalid_AliJun 12.2003 — holly...I thought copying and pasting was easy..but I guess I was wrong.

You are not implementing it correctly..please try to take a look at the lineof code I posted.

you are using Capital P as compare to small p????

window.print();
Copy linkTweet thisAlerts:
@PselusauthorJun 12.2003 — good lord tell me I'm not that stupid.........

BAH! I am that stupid

that's what I get for not coding for an entire week.....bleh!

thx khalid....you always answer my questions promptly
Copy linkTweet thisAlerts:
@Khalid_AliJun 12.2003 — :p

You are welcome

:p
Copy linkTweet thisAlerts:
@PselusauthorJun 12.2003 — riddle me this:

when printing a webpage there are 4 items which show in the margins: The page title, the page number, the date and the webpage address.....is there any way for me to control this and make sure that one (or all) of these items do not appear?
Copy linkTweet thisAlerts:
@Khalid_AliJun 12.2003 — I think you are talking about page setup settings.

On IE6+

Click on file

then select "Page Setup"
Copy linkTweet thisAlerts:
@PselusauthorJun 12.2003 — so there isn't a way to take away the url dynamically?

I don't want the url to disappear on every printout from IE.....just the ones from my site.


btw....forgive my idiocy....I'm a VB.Net programmer :p
Copy linkTweet thisAlerts:
@Khalid_AliJun 12.2003 — Thats allright...

.Net programmers are cool(cus of C# *_*)

JavaScript has its limitation as far as its allowed to access system resources.It can not make any changes to the browser or system settings.
Copy linkTweet thisAlerts:
@megavogelAug 14.2003 — Dear all...

I wonder if someone did this for MAC users? I did a lot of stuff for Windows users where printing is always an issue.

The command window.print() is working within all IE's on

Windows but how is it on IE on a MAC? I tried to fire the

command on a MAC and nothing did happen. Is there

a different command for MAC users or is it just not possible

to display a printing dialoge on IE + MAC?

Thanks to everybody !

Dan?
×

Success!

Help @Pselus 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.6,
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,
)...