[thelist] Perl, SSI, Paths and JS?

Morbus Iff morbus at disobey.com
Thu Feb 7 10:13:00 CST 2002


 >I'm including the script in a test layout using SSI: <!--#exec
 >cgi="/cgi-bin/picture_frame.pl"--> on a page thusly:
 >
 >http://www.mydomain.com/newtest/current/gallerytest.shtml
 >
 >When you click a thumbnail on the include, the path is incorrect and the
 >large image won't load because it's trying to link to
 >http://www.mydomain.com/newtest/current/picture_frame.pl?041.jpg and not
 >http://www.mydomain.com/cgi-bin/picture_frame.pl?041.jpg
 >
 >* How do I correct the path?

This you won't be able to fix unless you modify the CGI source (which
should be really easy). It appears that the script was coded under the
assumption that it would run standalone - people would go directly to the
script, and the script would refer to itself. When you use SSI's, you
challenge the script's assumptions.

 >I actually want the large image to appear in a pop-up, the JS code of which
 >is already in gallerytest.shtml. Therefore, I need to edit the <a href> tag
 >
 >The Perl code as it is:
 >And the JS code is:
 >So what I'm looking for is something like:

Ah. This line of code should solve both your problems:

  <a href=\"javascript:openWindow2('/cgi-bin/
                      $script_name\?$tnlist[($anum * 1]')\">

Note that this is ONE LINE! I've split it up and indented it for
readability. You had the right idea on your modifications, but you just got
the quotes mixed up.

Lemme know if it works out for you...


--
Morbus Iff ( softcore vulcan pr0n rulezzzzz )
http://www.disobey.com/ && http://www.gamegrene.com/
please me: http://www.amazon.com/exec/obidos/wishlist/25USVJDH68554
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus




More information about the thelist mailing list