|
-
Jun 13th, 2002, 12:10 AM
#1
A Javascript Print function???
A friend of mine told me that there exists a print function in javascript, which brings up the printer dialog box, so you can print the web page.
Is this true? I did a search, and found nothing. If it exists, what is it?
-
Jun 13th, 2002, 03:10 AM
#2
Hyperactive Member
This opens up the printer window.
A quick test on the browsers I have on my system (NN6.2, Mozilla, Opera, NN4.7, IE5.5) revealed that the only one that doesn't understand this code is Opera so I don't know if there is a diferent command for Opera or not!
4 out of 5 aint bad though
-
Jun 13th, 2002, 03:30 AM
#3
Originally posted by progressive
thank you!
-
Jun 13th, 2002, 03:30 AM
#4
Opera is irrelevant at this stage.
-
Jun 13th, 2002, 03:35 AM
#5
Fanatic Member
I don't think it's supported in Opera at present but you could try different methods to get around it. such as document.print() or just plain print().
-
Jun 13th, 2002, 06:02 AM
#6
Frenzied Member
I use
Code:
if (window.print) document.writeln('<a href="#" onclick="window.print(); return false;">Print<\/a>');
or something to that extent That way it will only offer printing if it's avaliable.
-
Jun 13th, 2002, 06:03 AM
#7
Hyperactive Member
good thinking
-
Jun 13th, 2002, 05:40 PM
#8
Frenzied Member
Yeah but I only copied from other people, so not really
-
Jun 13th, 2002, 05:49 PM
#9
PowerPoster
takes a true hero like Penfold to admit something like that
-
Jun 13th, 2002, 05:58 PM
#10
PowerPoster
oh and I just tried it in Opera, it works fine
-
Jun 13th, 2002, 11:54 PM
#11
Thanks for the Opera thing.
I can safely assume it'll work on Mozilla?
-
Jun 14th, 2002, 03:29 AM
#12
Fanatic Member
yeah, works in Mozilla. Well, i assume so because it's a EMCA standard...
-
Jun 14th, 2002, 05:31 AM
#13
Frenzied Member
Originally posted by chrisjk
takes a true hero like Penfold to admit something like that
Crumbs, thanks DM. [Penfold, shush]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|