Gossamer Forum
Home : General : Perl Programming :

reffer check problem IE and NS

Quote Reply
reffer check problem IE and NS
Hello All,

I have make a reffer check in a .cgi file it works fine i the same window but:

If i click on a link, which opens a new window with javascript, netscape will set the http_reffer but explorer don't set the http_reffer. I though both (ns and ie) will not set the http_reffer but somehow netscape did ? Well i also want IE to set the http_reffer like NS (even when it's opening a new window).

Part of the code is:

if ($ENV{'HTTP_REFERER'}) {
foreach (@your_server) {
if ($ENV{'HTTP_REFERER'} =~ /$_/i) {
$good_ref=1;
}
}
}
else { $good_ref=0; }

unless ($good_ref) {
etc.....


Function i use to open a new window is:
<SCRIPT LANGUAGE="JavaScript">
function openprint(naam,scrwidth,scrheight){
startDate= new Date();
tmpWin = window.open(naam, startDate.getTime(), "toolbar=yes,location=no,resizable=no,status=no,scrollbars=yes,menubar=yes,width=" + scrwidth + ",height=" + scrheight);
}
</script>

The call is:
<a href="JavaScript:openprint('../cgi-bin/print.cgi?g=/article/<%ID%>.html&t=tempprint&d=1',620,400)" onmouseover="status ='Print version'; return true">

What must i do so IE will also set http_reffer ? Or isn't it possible because i opened a new window, if so why is netscape working?

Doh strange problem....

Regards STartpoint.

Quote Reply
Re: reffer check problem IE and NS In reply to
Why not just use TARGET="_blank"?

- Mark

Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: reffer check problem IE and NS In reply to
Well in netscape it will open a whole overleaping browser. And i want a part overleaping it :)..

But this is not the problem i quess...

Quote Reply
Re: reffer check problem IE and NS In reply to
Check the javascript sites.

They have long tirades on the differences between NN and MSIE. And all the different versions.

BTW... last time I checked, one awesome page was the MOMA.org site.

The page is not very impressive, until you look at the source <G>

It makes a great point.

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/