Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

JavaScript:Tutorial, Printing a Webpage

printing

  • Please log in to reply
7 replies to this topic

#1 TcM

TcM

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 7563 posts

Posted 04 December 2006 - 11:22 AM

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


  • 0

#2 murthy_bsn

murthy_bsn

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 26 May 2008 - 02:02 AM

I want code[/I]
  • 0

#3 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 26 May 2008 - 09:13 AM

You don't need to DOWNLOAD it! It's only 1 line long!
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#4 TcM

TcM

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 7563 posts

Posted 26 May 2008 - 09:20 AM

He can't see code tags... if he doesn't at least make one post.
  • 0

#5 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 26 May 2008 - 09:24 AM

Really? I didn't know that. Of course, if he (or she) is blind, he/she can't see even after a post... ;)
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#6 TcM

TcM

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 7563 posts

Posted 06 June 2008 - 10:12 AM

Lol... If he is blind I doubt he will come here to see this printing JS code... lol
  • 0

#7 Xav

Xav

    CC Mentor

  • VIP Member
  • PipPipPipPipPipPipPipPip
  • 8356 posts

Posted 07 June 2008 - 10:07 AM

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.
  • 0
If you enjoy reading this discussion and are thinking about commenting, why not click here to register and start participating in under a minute?

#8 cryptokyle

cryptokyle

    CC Newcomer

  • Just Joined
  • PipPip
  • 11 posts

Posted 04 June 2009 - 11:20 PM

simple tutorial but still good.
  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download