Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Web Page without printing hyperlinks

Status
Not open for further replies.

smurf01

IS-IT--Management
Jul 6, 2002
470
GB
I was wondering if someone could help me, being a "newbie" to javascript I am not sure how to go about this. I have created a results page using DWMX and on the pages are hyperlinks back to other pages, is it possible to print out the page without printing the hyperlinks

Any Help would be much appreciated

Regards

Paul
 
Is it all hyperlinks you don't want to print or only some?

Humble Seeker
-----------------------------------------------------
The longest journey begins with the smallest step.
 
Humbleseeker,
I don't want to print any of the hyperlinks

Regards

Paul
 
hope you know something about CSS.

all your links should either have a class or if you want to affect absolutely all just leave them the way they are.

Insert two CSS external files one with media="all" and the other with media="print".


on the one with media="print" change the visibility property of the link (or class) to "hidden".



on top of your page insert this.
<LINK REL=&quot;stylesheet&quot; media=&quot;all&quot; TYPE=&quot;text/css&quot; HREF=&quot;main.css&quot;>
<LINK REL=&quot;stylesheet&quot; media=&quot;print&quot; TYPE=&quot;text/css&quot; HREF=&quot;print.css&quot;>


now inside print.css
have this.
A{visbility:hidden;
}

now if you have classes related to your links

A.myclass{
visibility:hidden;
}


That should do it.

grtfercho çB^]\..
&quot;Imagination is more important than Knowledge&quot; A. Einstein
 
grtfercho,
I know very little regarding CSS but I will try and read up on it and then try your code, your reference to CSS external files does not mean a lot to me

Regards

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top