jonnyfolk has asked for the wisdom of the Perl Monks concerning the following question:
Hi
I'm using the following script (pared down) to open up a framed window in my browser.
When I view it on IE for Mac OS 9.1 all is well. However on Win XP IE I get two 'page not found' s & Firefox give blank screens. I have also tried with my $host = $ENV{ 'SERVER_NAME' }; to no avail!
When I uncomment the named host however both browsers show the pages ok.
I'm trying to make this script generic over several sites so I don't particularly want to name the host every time. Could anyone tell me what is going wrong and how I might get round this?
Thanks
#!/usr/bin/perl -w use strict; use CGI qw/:standard :netscape/; print "Content-type: text/html\n\n"; my $root = $ENV{ 'DOCUMENT_ROOT' }; my $host = $ENV{ 'HTTP_HOST' }; #$host = 'mysite.com.au'; my $page = 'index.html'; print title('Title'), frameset({-rows=>'40%,60%'}, frame({-name=>'left',-src=>"http://www.$host/start.html"}), frame({-name=>'right',-src=>"http://www.$host/$page"}) );
2006-06-03 Retitled by g0n, as per Monastery guidelines
Original title: 'Windows XP browser doesn't seem to recognise $ENV{ 'HTTP_HOST' }'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (OT) Windows XP browser doesn't seem to recognise $ENV{ 'HTTP_HOST' }
by Joost (Canon) on May 31, 2006 at 19:03 UTC | |
by jonnyfolk (Vicar) on May 31, 2006 at 19:25 UTC |