On Wed, Jun 1, 2011 at 11:20 AM, John Delacour <johndelac...@gmail.com> wrote:
> I have a script in cgi-bin which gathers information from the user and
> replaces placeholders in a pre-written html page with the data collected via
> a different html interface.  Since the script needs to run from various
> servers I don't want to use absolute URIs for the images, css file etc. and
> I can't work out how to get relative pathnames to work.  I'd be grateful for
> the solution to this problem, which I imagine will appear very obvious once
> I know the answer.

It would probably help if you could show us a simple example of what
you're trying and what is wrong with it. :) I'm not sure I entirely
understand what you're doing. If you're just returning <link
href="blah" /> and  <img src="blah" /> tags to the user agent then
relative paths should work fine, as long as the path in the tags is
relative to the current Web page.

For example, if the current Web page is http://foo/bar/baz.html and it
references css/main.css and images/logo.png then those files should
exist as http://foo/bar/css/main.css and
http://foo/bar/images/logo.png on the server. :)

It doesn't sound like a Perl problem, but an HTML/server problem. :)
Please elaborate. :)


-- 
Brandon McCaig <http://www.bamccaig.com/> <bamcc...@gmail.com>
V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl.
Castopulence Software <http://www.castopulence.org/> <bamcc...@castopulence.org>

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to