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 |
|
|||
|
[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 20:26. |
|
|
|
||||
|
Re: Javascript Printer-Friendly Page "Creator"
The following may work:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
||||
|
Re: Javascript Printer-Friendly Page "Creator"
Tested in FF with the following code:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
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)
|
|
||||
|
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)
|
|
|||
|
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)
|
|
|||
|
Re: Javascript Printer-Friendly Page "Creator"
Are you sure that
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
||||
|
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)
|
|
|||
|
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)
|
|
||||
|
Re: Javascript Printer-Friendly Page "Creator"
try the following:
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: Javascript Printer-Friendly Page "Creator"
Thanks, it's working great!
Regards, SWagner
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
||||
|
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)
|
|
|||
|
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 21:14. |
|
||||
|
Re: Javascript Printer-Friendly Page "Creator"
Could you show the source of the entire page?
I'm not too certain of what is happening.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: Javascript Printer-Friendly Page "Creator"
Yes, here is the source:
Thanks
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Last edited by Stuart; Oct 10th, 2007 at 12:01. |
|
|||
|
Re: Javascript Printer-Friendly Page "Creator"
I don't like to do this, but ok. Here is the link.
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
||||
|
Re: Javascript Printer-Friendly Page "Creator"
Okay, is that the page the error is on?
and can you explain the error further?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
|
|||
|
Re: Javascript Printer-Friendly Page "Creator"
Yes. The error is in the middle of the page:
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
|||
|
Re: Javascript Printer-Friendly Page "Creator"
If you still have problems understanding this, just ask. I know it's a little confusing...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
||||
|
Re: Javascript Printer-Friendly Page "Creator"
I personally do not know of a solution I am afraid, maybe a "mentor" can help.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [SOLVED] PHP Printer-Friendly Page | Stuart | PHP Forum | 35 | Oct 17th, 2007 23:47 |
| [SOLVED] Show "Image" Depends On User "Status"? | Monie | Classic ASP | 6 | Oct 16th, 2007 01:22 |
| ? IS "meta name="robots" content="?" necessary in pages ? | Love2Java | Starting Out | 6 | Aug 8th, 2007 13:48 |
| window.opener.document["nameForm"].getElementById("someid").value; doesnt work | drpompeii | JavaScript Forum | 0 | Feb 17th, 2007 23:09 |
| printer-friendly web page | marisol | Web Page Design | 4 | Sep 28th, 2006 21:12 |