This is a discussion on "[SOLVED] Javascript Printer-Friendly Page "Creator"" within the JavaScript Forum section. This forum, and the thread "[SOLVED] Javascript Printer-Friendly Page "Creator" are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] Javascript Printer-Friendly Page "Creator"
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
[SOLVED] Javascript Printer-Friendly Page "Creator"
Hello again,
I am trying to work out a small problem I am having. What I am trying to do is to create a link that says 'Print this page', or something like that. When clicked, it will bring the user to print.htm, where a javascript code will output everything that is inside a certain tag, such as
Any help would be appreciated. Thanks, SWagner PS: My server does not allow/support asp, php, cgi, cfm, etc... so using those (although they're much better to use!), is out of the question.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Last edited by Stuart; Oct 8th, 2007 at 21:26. |
|
#2
|
||||
|
||||
|
Re: Javascript Printer-Friendly Page "Creator"
The following may work:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#3
|
||||
|
||||
|
Re: Javascript Printer-Friendly Page "Creator"
Tested in FF with the following code:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#4
|
|||
|
|||
|
Re: Javascript Printer-Friendly Page "Creator"
Thanks for replying, but I am trying to output the entire body.
SWagner
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
#5
|
||||
|
||||
|
Re: Javascript Printer-Friendly Page "Creator"
Oh sorry! Try making your body tag like this:
<body id="content">
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#6
|
|||
|
|||
|
Re: Javascript Printer-Friendly Page "Creator"
I had that idea too, but I have over 50 web pages that I would have to do this with. A little tedious, don't you think?
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
#7
|
|||
|
|||
|
Re: Javascript Printer-Friendly Page "Creator"
Are you sure that
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
#8
|
||||
|
||||
|
Re: Javascript Printer-Friendly Page "Creator"
I think I'm missing something.. as either way you will have to edit those 50 pages if they are static html.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#9
|
|||
|
|||
|
Re: Javascript Printer-Friendly Page "Creator"
I am still curious. Javascript has always worked for me. I think that I am just using the wrong code.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
#10
|
||||
|
||||
|
Re: Javascript Printer-Friendly Page "Creator"
try the following:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#11
|
|||
|
|||
|
Re: Javascript Printer-Friendly Page "Creator"
Thanks, it's working great!
Regards, SWagner
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
#12
|
||||
|
||||
|
Re: Javascript Printer-Friendly Page "Creator"
You're welcome, I wasted some ink on this
Glad you got it working.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
#13
|
|||
|
|||
|
Re: Javascript Printer-Friendly Page "Creator"
One more thing. I have a
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Last edited by Stuart; Oct 8th, 2007 at 22:14. |