Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > supress Printing 'print' link

Reply
Thread Tools

supress Printing 'print' link

 
 
Bob
Guest
Posts: n/a
 
      08-03-2007
Hello folks,

I havea link with a href of javascript:window.print()

it works fine except that it prints the 'Print' link itself......

anybody know how I can supress printing the link?

Thanks,

Bob

 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      08-03-2007

"Bob" <> wrote in message
news: ups.com...
> Hello folks,
>
> I havea link with a href of javascript:window.print()
>
> it works fine except that it prints the 'Print' link itself......
>
> anybody know how I can supress printing the link?


Configure your browser to not print the 'Print' link.

F1 will help.

--
Richard.


 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      08-03-2007
On Aug 3, 2:26 pm, Bob <Go1...@Yahoo.Com> wrote:

> I havea link with a href of javascript:window.print()
> it works fine except that it prints the 'Print' link itself......


And except that it doesn't work when JavaScript isn't available and is
a dead link instead.

And except that it produces a new and unexpected UI control for
something that the typical browser already presents the user with
several ways of doing (File > Print, Ctrl+P, a print button in a
toolbar, etc).

It is pointless. It doesn't allow users to do anything they couldn't
do before, breaks in some cases, and wastes screen space and
bandwidth.

> anybody know how I can supress printing the link?


Best way - get rid of it. Otherwise set up a print media stylesheet.

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

 
Reply With Quote
 
Andrew Bailey
Guest
Posts: n/a
 
      08-04-2007

"David Dorward" <> wrote in message
news: oups.com...
> On Aug 3, 2:26 pm, Bob <Go1...@Yahoo.Com> wrote:
>
>> I havea link with a href of javascript:window.print()
>> it works fine except that it prints the 'Print' link itself......

>
> And except that it doesn't work when JavaScript isn't available and is
> a dead link instead.
>
> And except that it produces a new and unexpected UI control for
> something that the typical browser already presents the user with
> several ways of doing (File > Print, Ctrl+P, a print button in a
> toolbar, etc).
>
> It is pointless. It doesn't allow users to do anything they couldn't
> do before, breaks in some cases, and wastes screen space and
> bandwidth.
>
>> anybody know how I can supress printing the link?

>
> Best way - get rid of it. Otherwise set up a print media stylesheet.
>
> --
> David Dorward
> http://dorward.me.uk/
> http://blog.dorward.me.uk/
>


Hi David,

The HTML Police will probably moan but this is how I do it...

<html>
<head>
<title>Test Page</title>
</head>

<script language="JavaScript" type="text/javascript">
<!-- HIDE PRINT BUTTON
function hideprintbutton(){
printon.style.display='none';
printoff.style.display='inline';
}
function showprintbutton(){
printoff.style.display='none';
printon.style.display='inline';
}
// - End of JavaScript - -->
</script>

<body onclick="showprintbutton()">

<span id="printon" style="display: inline"><a href="javascript:
hideprintbutton(); window.print()" title="Click here to PRINT this page"
hidefocus><img src="../images/input/print_button.gif" width="80" height="80"
border="0"></a></span>

<span id="printoff" style="display: none"><img
src="../images/input/print_button_mask.gif" width="80" height="80"
title="Click anywhere to restore the PRINT button"></span>

</body>
</html>

Hope this helps

Andy


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Supress output wshaklee@comcast.net XML 1 02-14-2006 03:11 PM
Supress error/warning of winapi in class? Edwin Knoppert ASP .Net 2 12-13-2005 06:18 PM
Re: Supress Windows Login pcbutts1 Computer Support 0 07-25-2005 11:20 AM
How to Supress Hello packets on an interface enabled for OSPF jimbo Cisco 6 07-17-2005 04:32 PM
How to supress pre-render evnet when page post back JG ASP .Net 3 10-21-2004 03:02 PM



Advertisments