-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mike Williams wrote:

> Your first question was:
> 
>> Is it possible to embed a CGI scrip into a HTML page?
> 
> Now you say:
> 
>> I'm not trying to put perl code into the page
> 
> You will get better answers if you start with clearer questions.
> 

I'm sorry I guess I should have been more specific in my question, I
never wanted to try and put perl code ino my HTML page, I know that that
is impossible because the browser has no clue what to do with it, what I
 am asking about is embedding the text/html the CGI.pm generates into a
page where I do have my style at.

>> I have the page generated by my CGI script inside another page that is
>> using my CSS.  I've tried to have my CGI script directly handle my CSS
>> but it didn't work due to its limited support for CSS.  So now I'm
>> trying to find a better way to make my CGI script look like the rest of
>> my site, I'm guessing this is what Template Toolkit if I can figure out
>> how to do it, or if my solution is the best.
> 
> Are you using CGI.pm?
> 
> If so, you can use css by adding: -style=>{'src'=>'/mystyle.css'} to
> the aguments of start_html:
> print $q->start_html(-style=>{'src'=>'/mystyle.css'});
> 
> This will cause your cgi code to use the stylesheet.
>

I have tried that and when I tried to call up a div object, in my css
(is attached) called leftcolumn, instead of getting a navy blue column
on the left side of the page it is just white.

> If you are not using CGI.pm please specify what other module(s) you
> are using, or if you are just generating the html yourself (not
> recommended).
> 

No I am letting CGI.pm generate the HTML for me, I figured that it would
be the easiest way to do it.

> 
> Template toolkit is a very useful and powerful tool, but it is
> probably overkill if all you want to do is use stylesheets.  You can
> do lots of other things with Template::Toolkit that may make it worth
> the time is takes to learn how to use it.  For example, having header
> and footer information that appears on all of the pages on your site
> in a template, allowing you to make one change to the template and
> have that effect your entire site.  You can also use template toolkit
> to generate static pages, so you can use templates to generate pages
> that do not require cgi, and re-used those templates in you cgi
> scripts.
>

- From what I see in the tutorial,
http://template-toolkit.org/docs/tutorial/Web.html#section_Dynamic_Content_Generation_Via_CGI_Script,
the Templete Toolkit only outputs information from the script, but I
need it to handle input as well, my script I am working on is a
guestbook so it needs to get the name of the guest and a message then
output it, as well as save it to a log for later use by the script.
Everything works but the plain white background is ugly and doesn't
match the rest of my site which is why I started this thread.

> Mike

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAklGpmQACgkQRMKiLy/EUZSx0wCfXwliS0Vfx/4/+fWdaCbtn/hu
rCAAn0LB9YeTJ9oZSc5dJV+MX7kEWqzd
=kr4k
-----END PGP SIGNATURE-----
body {
    margin:0;
    padding:0;
    line-height: 1.5em;
  }


b {
    font-size: 110%;
  }


em {
    color: red;
  }


h5 {
    color : #ff0000;
  }

#topsection {
    background: #fff;
    height: 90px;
    /*Height of top section*/text-align: center;
  }


#topsection h1 {
    margin: 0;
    padding-top: 15px;
  }


#contentwrapper {
    float: left;
    width: 100%;
  }


#contentcolumn {
    margin-left: 210px; /*Set left margin to LeftColumnWidth*/
  }


#leftcolumn {
    position: absolute;
    top: 0;
    left: 0;
    width: 210px; /*Width of left column*/
    height: auto;
    overflow: auto;
    background-color: #000080;
    color: #fff;
  }


#leftcolumn a {
    color : #FFFFFF;
    padding-left: 20px;
  }


#footer {
    clear: left;
    width: 100%;
    background: #000080;
    color: #000000;
    text-align: center;
    padding: 4px 0;
  }


#footer a {
    color: #000080;
  }


.innertube {
    margin: 10px;
    /*Margins for inner DIV inside each column (to provide padding)*/margin-top: 0;
  }
-- 
To unsubscribe, e-mail: beginners-cgi-unsubscr...@perl.org
For additional commands, e-mail: beginners-cgi-h...@perl.org
http://learn.perl.org/

Reply via email to