Hello. I have this three files. say_hello.cgi
use Modules::Parse ('start_parser'); use strict; my @resp = start_parser(); print @resp;
Parse.pm
package 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;
Htmlpage.pm
package 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;
In Mozilla firefox, beonex,netscape ok. Internet explorer 6.0 says
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
Can you help me? I think that related to...
<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.

In reply to Problem with internet explorer.Mozilla firefox,beonex,netscape ok. by Pescador

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.