Hi all,

I have written an upload script using CGI.pm and it works perfect

however it

looks bland. I would like ot understand how to make it look a lot nicer,
either continuing down the CGI.pm path or using some other method. Any
ideas?



What looks bland?  Pretty much everything dealing with the look of
anything related to CGI is going to be handled by the HTML that you send
back as the response.  Generally this is best handled with a combination
of HTML+CSS.


http://danconia.org


I am using CGI.pm to generate my HTML for me. For example here is a snippet
of my code:

print   $q->header,
                                $q->start_html('Merlin Control Center'),
                                $q->img({-src=>'/merlin/images/head.gif'}),
                                $q->br,
                                $q->start_multipart_form,
                                $q->filefield('file'),
                                $q->br,
                                $q->submit('Upload'),
                                $q->end_form,
                                $q->end_html;

As you can see that prints a pretty simple page. What I am after is how can
I use CGI.pm to only print the filefield and use normal HTML to create the
framework around it, without making the code a disaster area?

This is what I like to do, use a header and footer file (or variabel at least) That way you can have the css/html be super fancy nice looking.


use FIle::Slurp;

print $q->header();

print read_file('../htmltop.html');

# generate content here

print read_file('../htmlbot.html');

HTH
Lee.M - JupiterHost.Net

Thanks,
John




-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to