Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Print This Page.cgi

ignore a div


Visit Thailand

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

WebmasterWorld Senior Member 10+ Year Member

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)

10+ Year Member

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.

Featured Threads

Hot Threads This Week

Hot Threads This Month