Jump to content

JavaScript:Tutorial, Printing a Webpage

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Introduction:-
This tutorial will show you how to print a Webpage its simple but useful. Be careful how you use this.. Don't bug the user with the printing dialog lol

Solution:-
Make this between the <html>:-

<A HREF="javascript:window.print()">Click Here To Print</A>


Explanation:-
Well I don't know how I can explain this, it's too simple

A Preview:-
Html Preview:-
Posted Image

Printing Dialog:-
Posted Image

Print Preview:-
Posted Image

Conclusion:-
As Always Feedback is welcome and the full source is attached!!

Attached Files



#2
murthy_bsn

murthy_bsn

    Newbie

  • Members
  • Pip
  • 1 posts
I want code[/I]

#3
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
You don't need to DOWNLOAD it! It's only 1 line long!
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#4
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
He can't see code tags... if he doesn't at least make one post.

#5
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
Really? I didn't know that. Of course, if he (or she) is blind, he/she can't see even after a post... ;)
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#6
TcM

TcM

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 11,147 posts
Lol... If he is blind I doubt he will come here to see this printing JS code... lol

#7
Xav

Xav

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 13,118 posts
He could get one of those softwares that reads out pages for you. Except the way they read them out is monotonous and boring... just like me, he he.
Jordan said:

Good members, like yourself, stick around and post for ages to come!
Mr. Xav | Blog | Forums

#8
cryptokyle

cryptokyle

    Newbie

  • Members
  • PipPip
  • 11 posts
simple tutorial but still good.