in reply to Re: Open PDF file on load
in thread Open PDF file on load

The problem is Javascript can't read the array. I used this
$filecount = @allFilesList; <script type="text/javascript"> function OpenAllFiles() { for (i = 0; i < $filecount; i++) { window.open ("$folder/@allFilesList[i]", + i, "_blank"); } } </script>
it just opens the first file the number of times of filecount. Thanks for the help.

Replies are listed 'Best First'.
Re^3: Open PDF file on load
by almut (Canon) on Aug 11, 2009 at 19:59 UTC
    Javascript can't read the array

    Why don't you just create n window.open(...) statements with the appropriate URIs on the Perl side, and send the resulting JS to the browser?  (wrapped in <script> tags, of course)

      Thanks for the help. I have it working now.