Welcome to WebmasterWorld Guest from 184.72.177.182

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Print This Page.cgi

ignore a div

     
2:21 am on Mar 9, 2007 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 29, 2002
posts:1819
votes: 0


I use a simple .cgi code to get user friendly print pages.

You can start the print at one place and end in another.

Recently though I added a div in the middle of the text which shows up as a blank box when printing.

Is there anyway for me to get the script to ignore the div?

7:28 am on Mar 11, 2007 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 4, 2003
posts:365
votes: 5


Let your script parse the content before output. If you haven't any DIVs in the content except this one, eliminate it simply by something like $content =~ s/<div>[^<]+<\/div>//; but if you have other DIVs there, assign an id to the taget DIV like this : $content =~ s/<div id="remove_it"[^<]+<\/div>//;, for example. Depends on the content implementation anyway.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members