--- "Richard J. Barbalace" <[EMAIL PROTECTED]> wrote:
> Hi.
> 
> I'm trying to use CGI.pm to include multiple script tags in a web page.
> 
> I have code like the following:
>     $html .= header();
>     $html .= start_html(
>                       -script => {
>                           -language => 'JavaScript',
>                           -src      => [
>                                         '/javascript/foo.js',
>                                         '/javascript/bar.js',
>                                        ]
>                       },
>                      );
>     $html .= 'Body goes here.';
>     $html .= $query->end_html();

 [ snip ]

Richard,

If you want to have CGI.pm insert multiple script tags, set '-script' to an array ref 
of hashrefs:

    $html .= start_html(
                -script => [
                    {
                        -language => 'JavaScript',
                           -src   => '/javascript/foo.js'
                    },
                    {
                        -language => 'JavaScript',
                           -src   => '/javascript/bar.js',
                    }
                ] );

There are some great examples in 'perldoc CGI'.

Cheers,
Curtis "Ovid" Poe

=====
Senior Programmer
Onsite! Technology (http://www.onsitetech.com/)
"Ovid" on http://www.perlmonks.org/

__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. 
http://im.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to