Advertisement

05.04.2008 at 10:57AM PDT, ID: 23375089 | Points: 150
[x]
Attachment Details

getting CGI to use a javascript source file

Asked by jhill03 in Perl Programming Language, CGI Scripting

Tags: PERL, CGI, Javascript, Apache, IE 7, FF 2.0.0.14

I'm trying to get a PERL CGI script to use a javascript src file, but it doesn't seem like any functions in the file get run. I'm actually using 3 different src files, and only 1 doesn't seem to be working.

Here's my CGI code:
  print $q->header( -charset  => 'UTF-8', ),
        $q->start_html( -class => 'reporting',
                        -title => 'Reports',
                        -encoding => 'UTF-8',
                        -script => [ { -src => '/js/tool4.js'             },
                                          { -src => '/UploadProgress/progress.js'      },
                                          { -src => '/UploadProgress/progress.jmpl.js' },
                                   ],
                        -style  => [ { -src => '/css/IEstyles.css', },
                                     { -src => '/css/styles.css', },
                                     { -src => '/UploadProgress/progress.css', -rel => 'StyleSheet', -title => 'Default' },
                                     { -src => '/css/progress_blueblock.css',   -rel => 'Alternate StyleSheet', -title => 'Blue Blocks' },
                                     { -src => '/css/progress_bluebar.css',     -rel => 'Alternate StyleSheet', -title => 'Blue Animated Bar' },
                                   ],
        ),

The javascript in /UploadProgress/progress.js and /UploadProgress/progress.jmpl.js are being called and are working correctly. It is the /js/tool4.js file that doesn't seem to be called correctly. I can't seem to figure out why one works and the other doesn't. If I just try /js/tool4.js above it still doesn't work...

In httpd.conf I have:
  Alias /js /var/web/www/js/
  Alias /UploadProgess /var/web/www/UploadProgress


Any thoughts?

Thanks.Start Free Trial
[+][-]05.04.2008 at 12:14PM PDT, ID: 21496650

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628