[Pdx-pm] CGI.pm question about start_html(-script)

Thomas J Keller kellert at ohsu.edu
Mon Jul 19 15:14:26 CDT 2004


chagrin ;-)
..typo in the path was all that was wrong. Sorry 'bout that.
TK
On Jul 19, 2004, at 1:00 PM, <publiustemp-pdxpm at yahoo.com> wrote:

> --- Thomas J Keller <kellert at ohsu.edu> wrote:
>> Greetings CGI.pm users,
>> I would like to call more than one external javascript script in a
>> workrequest form I'm writing using CGI.pm. How do I code that in the
>> start_html() method?
> [snip]
>> And I've tried giving -script an anonymous array:
>> 	-script=>[	{'-language'=>'JavaScript',
>> 			'-src'=>'http://www.ohsu.edu/include/header_alt.js',
>> 			}, {'-language'=>'JavaScript',
>> 			'-src'=>'http://www.ohsu.edu/research/core/verify.js',
>> 			}, {'-language'=>'JavaScript',
>> 			'-src'=>'http://www.ohsu.edu/research/core/verify2.js',
>> 			} ]
>
> Hi Tom,
>
> Maybe I'm missing something obvious, but I don't see the problem.  
> This:
>
>   print $q->start_html(
>     -title=>'The Riddle of the Sphinx',
>     -script=>[
>       {
>         -language => 'JavaScript',
>         -src      => '/javascript/utilities10.js'
>       },
>       {
>         -language => 'JavaScript',
>         -src      => '/javascript/utilities11.js'
>       },
>     ]
>   );
>
> Prints this:
>
>   <?xml version="1.0" encoding="utf-8"?>
>   <!DOCTYPE html
>           PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
>           "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
>   <html xmlns="http://www.w3.org/1999/xhtml" 
> lang="en-US"><head><title>The Riddle of the
> Sphinx</title>
>   <script language="JavaScript" src="/javascript/utilities10.js" 
> type="text/javascript"></script>
>   <script language="JavaScript" src="/javascript/utilities11.js" 
> type="text/javascript"></script>
>   </head><body>
>
> Can you provide us with a larger code snippet?  What version of CGI.pm 
> are you using?  Also, when
> you say it doesn't work, what output are you expecting and what output 
> are you actually getting?
>
> Cheers,
> Ovid
>
> =====
> Silence is Evil            
> http://users.easystreet.com/ovid/philosophy/indexdecency.htm
> Ovid                       
> http://www.perlmonks.org/index.pl?node_id=17000
> Web Programming with Perl  http://users.easystreet.com/ovid/cgi_course/
> _______________________________________________
> Pdx-pm-list mailing list
> Pdx-pm-list at mail.pm.org
> http://mail.pm.org/mailman/listinfo/pdx-pm-list





More information about the Pdx-pm-list mailing list