Forum Moderators: DixonJones

Message Too Old, No Replies

referrer problem

referrer problem

         

sully

7:31 pm on Apr 23, 2003 (gmt 0)

10+ Year Member




I was hoping someone could help,
i have a domain name that uses framed forwarding like this:

<HTML>
<HEAD>
<TITLE>examnple title</TITLE>
<frameset rows='100%,*' border='0' frameborder='0' framespacing='0' framecolor='#000000'>
<frame src='http://www.example.com/index.html' name='display'>
</frameset>
</html>

i have a php stats counter that is triggered by some javascript code on each of my pages like this:

<script language="JavaScript">
var image = "http://www.notherexample.com/pixel.gif";
var web = "danesonline";
var from = escape(document.referrer);
var page = "indexpage";
var query = location.search;
var colorDepth = window.screen.colorDepth;
var res = window.screen.width + "," + window.screen.height;
var maxres = window.screen.availWidth + "," + window.screen.availHeight;
if (navigator.javaEnabled() == 1){ var javaa = "Enabled";} else {var javaa = "Disabled";}
var link = "<img src='http://www.notherexample.com/hit.php?referer=" + from + "&request=" + page + "&website=" + web + "&query=" + query + "&cDepth=" + colorDepth + "&resol=" + res + "&maxresol=" + maxres + "&java=" + javaa + "&img=" + image + "' align='middle' style='display:none' alt='&copy;2002 AK Communications'>";
document.write(link);
</script>

how do i alter the 'var from = escape(document.referrer);'
so it shows referrers from the domain name page rather than the site pages? i need to see which search engines are getting hits to my site.. i have tried everything i can think of

help!
PAul Useless

[edited by: Woz at 1:38 am (utc) on April 25, 2003]
[edit reason] no specifics please [/edit]

GeorgeGG

2:03 am on Apr 24, 2003 (gmt 0)

10+ Year Member



I don't know anything about frames.

If you put your 'stats counter' in the main frame
between:
</frameset>
</html>
will it show the referrer like you want?

I use a JavaScript type logger and have no problem
getting the referrers from search engines.

GeorgeGG

sully

11:38 pm on Apr 24, 2003 (gmt 0)

10+ Year Member




I have a counter that uses javascript too, but if i put it outside of the frameset tage it doesnt activate the counter, my counter uses a little image to download and count.
What counter do you use?

Paul

jdMorgan

12:28 am on Apr 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You may need to refer to the parent document in order to get a referrer.

Jim

GeorgeGG

1:17 am on Apr 25, 2003 (gmt 0)

10+ Year Member



What counter do you use?

About like what you have but home made.

GeorgeGG

sully

2:07 pm on Apr 25, 2003 (gmt 0)

10+ Year Member



Hi Jim,
My counter relies on downloading a little gif, if the code is not in the main frame the counter doesn't count.

I have tried referring to the parent document, i have tried all kinds of paths but with no luck, this is the code i need to change:
var from = escape(document.referrer);

i have tried
var from = escape(parent.referrer);
and var from = escape(parent.document.referrer);

can you help i'm stuck here ....help

Paul

jdMorgan

4:28 pm on Apr 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Paul,

I wish I could... But there is a reason my post was so ambiguous - I've never done what you're doing here, and I don't know the detailed answer... Not much of a JavaScripter myself, actually.

So... <bump> :)

Jim

sully

4:38 pm on Apr 25, 2003 (gmt 0)

10+ Year Member



Thanks anyway jim,

i have tried top.document.refferrer and loads of other combinations with no success,

has anyone else got any ideas?

PAul the stupid