in reply to Can't get Open Document popup window to appear

Are you sure your browser is configured to allow following to local file:// URIs from non-file:// URIs? At least Firefox does not do so by default. I think you will either have to have all your links be http:// links or have to reconfigure your browser to allow file:// URIs. Note that opening arbitrary local file:// URIs is considered a security hole and thus, most browsers disallow this.

Also see this Mozilla KB entry for how to reconfigure Firefox. Not that I recommend doing so, at least not for a browser that is to be used outside of a local intranet.

Replies are listed 'Best First'.
Re^2: Can't get Open Document popup window to appear
by milliken (Initiate) on Sep 23, 2011 at 17:42 UTC

    Thank you for your response. I'm not certain that this could be the problem, since as I mentioned (briefly in passing), when I save the generated source code into a file (using "View Page Source") and the plug that code into the browser, everything works exactly the way I need it to. It only fails when I am using the generated code from the Perl script, which was created with the PRINT command:

    print "<a href=\"file:$filepath$path_ext\">$format</a></TD>\n";

    resulting in this line in the HTML code:

    <a href="file:/net/server/Docs/02.pdf">pdf</a></TD>

    If the browser will not accept following to local file:// URIs, then why would this succeed when it comes from a source code file instead of automatically generated code?

      Where do you save your file? If a page is served over the http protocol, it cannot open file URIs local to the client. If you "save the page" locally and then open it by double-clicking, you open the page as a local file. Local files are allowed to open other local files. Save your page and upload it to your webserver. If the static page works from there, your problem is elsewhere. If the static page fails in the same way your Perl script fails, the error is as I said.

        Thanks again for your response. I rewrote the Perl code to cause it to write the generated HTML code into a file on the webserver (not on the client). I then use the browser to access that file with the Open File... command, and the result works just fine.

        So you wrote "Save your page and upload it to your webserver. If the static page works from there, your problem is elsewhere." I didn't actually upload the file to the webserver, I wrote the file directly onto the webserver's disk. So, doesn't this mean that my "problem is elsewhere"?

        I chose a read/writeable directory on the webserver and generated a unique filename for the file:

        @timedata = localtime(time); $cur_time = join('', @timedata); open (OUTPUT, ">/net/server/other/exec_$cur_time.html");

        Then all my PRINT commands go into OUTPUT. I am still not achieving my goal of directing the user to that HTML page, but I am trying to test the theory of whether I am allowed to access a file on the webserver...