robersl has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks, I am trying to pass a value for an onLoad attribute through to the body tag via a CGI.pm, v1.62 start_html statement. I can do this cleanly with manual HTML tags, but CGI.pm leaves a blank space in the body tag proportional in size to the value I am trying to pass in. My code looks like this:
print $q->header(), $q->start_html(-dtd=>'-//W3C//DTD HTML 4.0 Transition +al//EN', -script=>{-language=>'JavaScript', -src => '/daily_word.js'}, -onload => 'document.forms[0].elements[1].focus()');
Any ideas on what I'm doing wrong? Thanks.

Replies are listed 'Best First'.
Re: Invisible Body Tag Attribute
by pg (Canon) on Mar 04, 2003 at 04:06 UTC
    I tried your code, and it is okay. I am using AS5.8.0, and
    $CGI::revision = '$Id: CGI.pm,v 1.62 2002/04/10 19:36:01 lstein Exp $';
    $CGI::VERSION='2.81';