How to show a image link invisible to printer

I need to include an imaga link in some pages that lend me to print the page. When this page print, I don`t want to include the image link. I need, then, to show a image that the navigator don´t print.
jjjj060497Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Trevor013097Commented:
Unfortunately there is no way to invoke the Print function either through HTML or through JavaScript and also there is no way of preventing images from printing but being able to display them.

Sorry to dissapoint you but there are still some things that HTML and Javascript just cannot do.

cheers,

    Trevor
0
jjjj060497Author Commented:
I can invoke a print function from a html page but i only want to find a image (or a text if there aren`t another posibility) that not print.
 I know that a button don´t be printed, but I prefer not to use it. I try to find the ssame function with a image link.

0
Trevor013097Commented:
My appologies jjj I was not aware of a function to invoke print.

How do you do it?
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

RM032397Commented:
Yes, I like Trevor would very much like to know the answer.

To make an image not print, put it so far to the right that it falls outside of the printed page area.
0
jjjj060497Author Commented:
This work is for a information kiosk. The user must view all the page without move all the time in the window. I must put the image in the printer area.
 The method I use to print need to install some programs in the client and configure the navigator he use.
 I have a mime type that open a program call "CONTROLP.exe". In the pages I want to print, I include a link to a file with this extension. The navigator launch the program and the program (CONTROLP) send some keys to the navigator. The navigator, finally , print.
 
0
funCommented:
In that case why don't you flip the image in question to a pixel gif just before you print. I assume you are using a browser like
Netscape that recognizes the image array. Then afterwards you can  reload the page or in some way reflip the image back to it's normal state.
0
jjjj060497Author Commented:
I don´t understand your answer. Please can you explain it more?. I don´t want to reload the page (it´s a dinamyc page).
0
funCommented:
I meant to use the image array to change the image to one that doesn't show on the page.
image[4].src="pixel.gif";

put this statement in the function that calls your print routine, and then after the print reset the image back to the original view.
image[4].src="original.gif"
0
jjjj060497Author Commented:
I don´t want to reload the page. I need that the image be transparent (invisible) only to print.

0
funCommented:
You will not have to reload the page, just change the image to one that won't show when you print the page. I never said anything about reloading the page. After you have printed the page, you can just change the image back to the original form.
0
jjjj060497Author Commented:
Ok. The problem is that I print the page sendingt a Control-p to the browser and I don´t know how to include the Javascript when I do that. Do you understand?. I don´t use a Javascript code to print, I use a sending of keys from a program that is called byt a virtual web page (with an extension not registered). It is like I pulse th Keys Control-p and Enter (you can prove it in the browser). How to tell the javascript code to active it when the browser print?.

0
funCommented:
No I don't understand. Somehow the user must activate or do something that causes the print command to execute. Somthing must happen in the browser that causes it to print out. It is possible that you can use on onLoad event handler or an onChange handler that recognizes when you are going to try and print. If you would explain in detail the exact sequence of events that the user goes through and what happens to cause the print event, I might be able to suggest a course of action.
When you respond, stop rejecting my answer until I give up trying or you accept my answer. Respond by comments.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jjjj060497Author Commented:
Ok. The user click on one link to a url like this "file://c:/.../pepe.jj". The browser have a mime entry that tell it to use a program called "pbrprint". The browser open it. This program send the keys Control-p and Enter to the Browser. The Borwser Print (without reload the page i think).
 All of it is the same as you press the keys in a browser.
0
funCommented:
OK. You can use javascript to process an onClick handler for the link you pressed to first change the image to a pixel gif, then to activate the link that does the printing, then return the image to its original form. None of which should require that you reload the page.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.