PDA

View Full Version : I still need more help with things!


Ben@WEBProp
06-17-2003, 05:28 PM
Ya I know, this must mean that I really am a newbie, but I would greatly appreciate your help.

I am desperatly looking for a Pint This command for a page so that when the user clicks the command, they print off a seperate document. To be specific, I want them to click on a basic hyperlinked image to print off a Word Document that looks exactly like the image that I have put on the page. I have already saved the image into a word document and formatted it to the specifications that I want.

To get a visual, here is an example of kinda what I want. Go to http://money.cnn.com/2003/06/17/markets/markets_newyork/index.htm and click on the print this button at the top to bring you to my example page. I looked at the source code, but I quickly became lost.

I don't know if it matters or not, but I am using it in conjunction with the Textual tooltip Script found at http://www.dynamicdrive.com/dynamicindex5/linkinfo.htm

I greatly appreciate any help that you can offer.
Thanks again!
-Ben

arnyinc
06-17-2003, 05:56 PM
The example you linked to was printing text from an html document in a web browser. You are trying to print an image in a word document in Microsoft Word.

I don't believe there is anyway to force print commands to Microsoft Word. It might be possible if you popup a Word doc in a new window and send a print command from the window that popped it up. You'd be better off just leave the picture in a web browser in an html page and printing it from there.

Ben@WEBProp
06-17-2003, 06:05 PM
Alright, I see what you are saying...

However, I am the extreme newbie. What is the print command in code? Is there one that someone knows? Or do I just have to write a message saying "Click file, print, blah blah blah sassyfrass"?

arnyinc
06-17-2003, 06:09 PM
Sure, it's pretty quick and short

<a href="#" onclick="javascript:window.print()">Click here to print!</a>

You have to have the print dialog popup though.

Ben@WEBProp
06-17-2003, 06:24 PM
Oh I see! I love this programming stuff! I'm sure it's real simple to you, but that is so cool! Thanks a ton! This helps out a ton!

Oh ya, one more question while I'm able to think of it...

I am working in frames, so will this command print the whole window or just the specified frame? If it prints the whole window, should I have the to-be-printed object open in a new window and print from there, or can I change "window" to something like "frame" or "frameset X"?

-Ben

Ben@WEBProp
06-17-2003, 07:23 PM
If I could get someone to respond to my last question by 3:00, that would be awesome!

Thanks!

-Ben

Skyzyx
06-17-2003, 09:16 PM
It will print the currently selected frame... just like the regular print dialog does.