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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add background tile to html output 1

Status
Not open for further replies.

roadstain

IS-IT--Management
Mar 7, 2002
33
US
I am using a perl script for guestbook and am new to this.

I have an output page that is generated by the perl script in which is an Acknowledgement and Thankyou page for signing the guest book.

My question is how do I add, in code, a background tile to the html page output?

I have tried the following commands and everything outputs to the guestbook without issue - problem is the background tile is never applied to the Thankyou page generated by the code below.

# Print Beginning of HTML
print "Content-Type: text/html\n\n";
print &quot;<html><head><title>Thank You</title></head>\n&quot;;
print &quot;<body BACKGROUND=\&quot;images/image001.jpg\&quot;>\n&quot;;
print &quot;<body><h1>Thank You For Signing The Guestbook</h1>\n&quot;;

print &quot;Thank you for filling in the guestbook. Your entry has\n&quot;;
print &quot;been added to the guestbook.<hr>\n&quot;;
print &quot;Here is what you submitted:<p>\n&quot;;
print &quot;<b>$FORM{'comments'}</b><br>\n&quot;;

The code goes on to add the values collected from the html form. The line in question is the

print &quot;<body BACKGROUND=\&quot;images/image001.jpg\&quot;>\n&quot;;

Any help you can give me would be great. Thanks.
 
The line should be:

print &quot;<body BACKGROUND='/images/image001.jpg'>\n&quot;;

Note the / before the images directory. The reason is because your browser knows that the page has come from your cgi directory and thinks the images directory is there.

I've also changed the \&quot; to ' as that makes it a little more readable.


Barbie
Leader of Birmingham Perl Mongers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top