Pescador has asked for the wisdom of the Perl Monks concerning the following question:
Parse.pmuse Modules::Parse ('start_parser'); use strict; my @resp = start_parser(); print @resp;
Htmlpage.pmpackage Modules::Parse; use Exporter; @ISA = ('Exporter'); @EXPORT_OK = ('start_parser'); use strict; use CGI; use CGI::Carp qw(fatalsToBrowser set_message); use CGI::Pretty qw(:standard); #My Modules use Modules::Htmlpage; sub start_parser { my @resp = (); if (!param()){ push @resp, &Modules::Htmlpage::make_header("Hello first page."); push @resp, &Modules::Htmlpage::make_first_page(); push @resp, param(); } elsif (param('get_in')){ push @resp, &Modules::Htmlpage::make_header("I say hello to you.") +; push @resp, &Modules::Htmlpage::make_top_content("home"); push @resp, param(); } else{ push @resp, Modules::Htmlpage::make_header("There are params but n +ot get_in."); push @resp, Modules::Htmlpage::make_top_content("home"); push @resp, param(); } push @resp, end_html; return @resp; } 1;
In Mozilla firefox, beonex,netscape ok. Internet explorer 6.0 sayspackage Modules::Htmlpage; use Exporter; @ISA = ('Exporter'); @EXPORT_OK = ('make_header', 'make_first_page', 'make_top_content'); use strict; use CGI::Carp qw(fatalsToBrowser set_message); use CGI::Pretty qw(:standard); my $path = '../images/mimgarea'; sub make_first_page { my @resp = (); push @resp, start_form, #method: POST # action: this script # enctype: application/x-www-form-urlencoded table( {-border=>'0', -width => '950' , -align=>'center', -cellspac +ing=>"0", -cellpadding=>"0",}, Tr( td( {-align=>'center',-width=>"50%"}, image_button( { -name => "get_in", -title => "Enter hello", -alt => 'ENTER', -value=> "ENTER", -src=>"$path/hello.gif"}, ), ), ), ), endform; return @resp; } sub make_header{ my @resp = (); my $title = shift; my $descript = "Hello page description."; push @resp, header, start_html( { -title => $title, -meta => { 'keywords' => 'Hello, blabla', 'description' => "$descript" ,}, } , ); return (@resp); } sub make_top_content { my $come_from = shift; my @resp = (); push @resp, table ({ -class=>'top', -width=> '950', -border=> "0", + -cellpadding=> "0", -cellspacing=> "0", -align=> "center"}, Tr ( td ('Inside hello page.\n'),), ); return (@resp); } 1;
Can you help me? I think that related to...Internal Server Error The server encountered an internal error or misconfiguration and was u +nable to complete your request. Please contact the server administrator, admin@yourhost.com and inform + them of the time the error occurred, and anything you might have don +e that may have caused the error. More information about this error may be available in the server error + log. ---------------------------------------------------------------------- +---------- Apache/2.0.48 (Win32) mod_perl/1.99_12 Perl/v5.8.3 Server at localhost + Port 80
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-U +S">
The xml:lang attribute of the HTML tag is not supported. Netscape Navigator 4.0, Netscape Navigator 6.0, Microsoft Internet Explorer 5.0, Microsoft Internet Explorer 5.5, Microsoft Internet Explorer 6.0
The xmlns attribute of the HTML tag is not supported, but it has no detrimental effect. Netscape Navigator 4.0, Netscape Navigator 6.0
The Lang attribute of the HTML tag is not supported. Netscape Navigator 4.0 , Netscape Navigator 6.0
Thanks, that is all that i can find bad in my prog. ;) Any suggestion to do a better code?
Thanks for your time.
|
|---|