> 
> I'm trying to customize the look of a guestbook show page on an NT server.
> In line six, it works OK if I change the font size and add the blockquote,
> but if I change the font color, either with color="#\6699CC\" or
> color="#6699CC" I get an error message, "document contains no data."

    First, you are missing the first line of the program.  This tells the
interpreter what to do with the file.  (Assuming it is a UNIX type server)
The exact line depends upon where your sysadmin put the PERL interpreter.
The line is usually something like:

#!/usr/bin/perl
#!/usr/local/bin/perl

  Second, the changes you listed unbalance the quote marks.  Backslash
doublequote is a fake quote mark.  Take out the backslash, and it becomes
real.  Backslash pound sign isn't what you want.  To avoid that, I use
single quotes around larger areas where I will not want to have control
characters.
 
> Can you explain what parameters I can change:
>       background color?

Change:

   bgcolor=#AABBCC


>       font styles?

   Change/add the appropriate items within the FONT tag.

>       font colors?

Change:
    text=#AABBCC

>       Can I add a graphic with the company logo at the top?

   Sure, add the line below, changing icon-url.gif to whatever the url of
the icon is.  You will need to put it before the "while" loop but after
the &PrintHeader.  Note the use of "\n" to start the new line, then the
use of single quote marks to allow double quote marks without backslashes.

     print '<IMG SRC="icon-url.gif">',"\n";

>  If I can change stuff, how exactly do I do it?

   Depends on where the site is, but if you did make some changes, you
have obviously solved most of that problem.  You just need to look at PERL
a bit more.  I can help you some more if you like. Just e-mail me off
list.

> What does the "\" in <body bgcolor=\"#FFFFFF\"> mean?

     It means the character following is a fake as far as the PERL
interpretor is concerned -- do not interpret it into a control character.
BUT... if it were in front of a character, it would mean the character is
a control character.  Same with numbers, which is why your \6... did not
work.  As per above, \n is a new line code, while \" means this isn't
really a double quote mark, so the quoted string has not ended.

#!/usr/bin/perl

> $gbook = "guestbook.txt";
> &PrintHeader;
> print "\n\n\n";
> print "<html><head><title>Guest Book</title></head>\n";
> print "<body bgcolor=\"#FFFFFF\">\n";
> print "<center><font KUsize=+3 color="#\6699CC\">Guest

                             Bingo:   \"#66, not above!   

> Book</font><blockquote><hr></center>\n";

   I would write that line as:

print '<center><font size=+3 color=#6699CC>Guest Book'
     ,'</font><blockquote><hr></center>',"\n";


   The rest are mostly stylistic differences from the habits that I have
developed over a lifetime of programming....

>       while ($line ne "")

        while ("" ne $line)

   If you put the constant on the left in any evaluation, screwing up on
the evaluation vs assignment always results in an error.  This little
stylistic item has saved me many, many an hour debugging.  Developed that
when a professional programmer dropped a bug ridden half foot thick C
program printout and some ten or twenty diskettes on my desk and said "I
quit!". Most of the bugs were just that -- assignment during evaluation
because he used = instead of == in C.   
____________________________________________________________________
--------------------------------------------------------------------
 Join The Web Consultants Association :  Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------

Reply via email to