Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to show a image link invisible to printer

Posted on 1997-07-16
14
Medium Priority
?
191 Views
Last Modified: 2008-03-03
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.
0
Comment
Question by:jjjj060497
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
  • +1
14 Comments
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1268542
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
 

Author Comment

by:jjjj060497
ID: 1268543
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
 
LVL 5

Expert Comment

by:Trevor013097
ID: 1268544
My appologies jjj I was not aware of a function to invoke print.

How do you do it?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Expert Comment

by:RM032397
ID: 1268545
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
 

Author Comment

by:jjjj060497
ID: 1268546
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
 
LVL 1

Expert Comment

by:fun
ID: 1268547
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
 

Author Comment

by:jjjj060497
ID: 1268548
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
 
LVL 1

Expert Comment

by:fun
ID: 1268549
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
 

Author Comment

by:jjjj060497
ID: 1268550
I don´t want to reload the page. I need that the image be transparent (invisible) only to print.

0
 
LVL 1

Expert Comment

by:fun
ID: 1268551
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
 

Author Comment

by:jjjj060497
ID: 1268552
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
 
LVL 1

Accepted Solution

by:
fun earned 150 total points
ID: 1268553
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
 

Author Comment

by:jjjj060497
ID: 1268554
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
 
LVL 1

Expert Comment

by:fun
ID: 1268555
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

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question