Site logging and referer

liunx

Guest
Hi all<br />
<br />
Im having a problem i have made a website using frames and im trying to log where users are coming from, I am using a free cgi script logging form that uses javascript link to log people from the site? as im using frames i have added the logging link to the menu page but with doing this the referer always come out the the site url not the url where the visitor came from.<br />
<br />
Is there anyway i can add the javascript link for logging into the frameset page so that it actually works i have tried various ways but cant get it to work at all??<br />
<br />
Thanks for all your help <br />
<br />
Nook6<!--content-->you need to insert it into the index page.<!--content-->Hi<br />
<br />
Scoutt Yes thank you it has to go into the index page, but what i really need to know is where can i put it in the index page, because im using frames the index page is a frameset page so whereever i put it in there is doesnt seem to work?<br />
<br />
Nook6<!--content-->does it output somehting to the screen or just log somehing behind the scenes?<br />
<br />
if it log behind the scenes then put it in the head section.<!--content-->Hi<br />
<br />
This is the code<br />
<br />
<script language="javascript" src=http://www.htmlforums.com/archive/index.php/"uf.js"></script><br />
<br />
it logs everything in the background i put this code in the <head> section and it stopped the whole page from working?<br />
<br />
Nook6<!--content-->Originally posted by nook6 <br />
<br />
Im having a problem i have made a website using frames and im trying to log where users are coming from, I am using a free cgi script logging form that uses javascript link to log people from the site? <br />
<br />
<script language="javascript" src=http://www.htmlforums.com/archive/index.php/"uf.js"></script><br />
<br />
Is not the script.<br />
It is the path to an external file containing the script.<br />
Do you have the uf.js file on your server?<br />
If so, post the contents here.<br />
<br />
.....Willy<!--content-->Originally posted by nook6 <br />
and it stopped the whole page from working?<br />
<br />
Nook6 <br />
it shouldn't unless the script is messed up.<!--content-->Sorry all <br />
<br />
heres the contents of the uf.js file<br />
<br />
<br />
<br />
<br />
var refz = escape(document.referrer)+"";<br />
<br />
if (navigator.cookieEnabled) { <br />
cSupport = navigator.cookieEnabled; } else <br />
cSupport = "undefined"; <br />
var URLloc = escape(document.location)+"";<br />
function machiner() { <br />
if (navigator.cpuClass) { <br />
switch (navigator.cpuClass) { <br />
case "x86" : theCpu = "x86 [Intel processor]"; break; <br />
case "68K" : theCpu = "68K [Motorola processor]"; break; <br />
case "Alpha" : theCpu = "Alpha [Digital processor]"; break; <br />
case "PPC" : theCpu = "PPC [Motorola processor]"; break; <br />
case "Other" : theCpu = "Other"; break; }; <br />
} else { <br />
theCpu = "Undefined"; }; <br />
return theCpu; }; <br />
var cpuz = machiner();<br />
var usd = screen.width + "x" + screen.height ; <br />
var usc = screen.colorDepth + "Bit";<br />
dpass="&cSupport="+cSupport+"&cpuz="+cpuz+"&usd="+usd+"&usc="+usc+"&refz="+refz+"&URLloc="+URLloc;<br />
<br />
st="<img src='http://www.htmlforums.com/archive/index.php/"; mi="/cgi-bin/UFDust.cgi?"; en="' alt='' border='0'>";<br />
<br />
document.write(st+mi+dpass+en);<!--content-->Originally posted by nook6 <br />
Sorry all <br />
<br />
heres the contents of the uf.js file<br />
<br />
<br />
<br />
<br />
var refz = escape(document.referrer)+"";<br />
<br />
if (navigator.cookieEnabled) { <br />
cSupport = navigator.cookieEnabled; } else <br />
cSupport = "undefined"; <br />
var URLloc = escape(document.location)+"";<br />
function machiner() { <br />
if (navigator.cpuClass) { <br />
switch (navigator.cpuClass) { <br />
case "x86" : theCpu = "x86 [Intel processor]"; break; <br />
case "68K" : theCpu = "68K [Motorola processor]"; break; <br />
case "Alpha" : theCpu = "Alpha [Digital processor]"; break; <br />
case "PPC" : theCpu = "PPC [Motorola processor]"; break; <br />
case "Other" : theCpu = "Other"; break; }; <br />
} else { <br />
theCpu = "Undefined"; }; <br />
return theCpu; }; <br />
var cpuz = machiner();<br />
var usd = screen.width + "x" + screen.height ; <br />
var usc = screen.colorDepth + "Bit";<br />
dpass="&cSupport="+cSupport+"&cpuz="+cpuz+"&usd="+usd+"&usc="+usc+"&refz="+refz+"&URLloc="+URLloc;<br />
<br />
st="<img src='http://www.htmlforums.com/archive/index.php/"; mi="/cgi-bin/UFDust.cgi?"; en="' alt='' border='0'>";<br />
<br />
document.write(st+mi+dpass+en);<br />
<br />
<br />
<br />
That seems more of a counter script than a logger script.<br />
Whereas the cgi-bin tracks which page loads the image.<br />
<br />
<img src='http://www.htmlforums.com/archive/index.php/"; mi="/cgi-bin/UFDust.cgi?"; en="' alt='' border='0'><br />
<br />
Either way. Is the cgi-bin on your server?<br />
<br />
....Willy<br />
<br />
Question:<br />
Soutt;<br />
<br />
Why was this post editted by yourself?<br />
Last edited by scoutt on 11-02-2003 at 02:17 PM<br />
<br />
I see no difference in the text<br />
nor was I inappropriate within the post.<br />
Merely curious, not really concerned. :D <br />
<br />
....Willy<!--content-->and another thing is that it outputs a image so it has to go in the body. what does you index frame look like?<!--content-->Put that script link into the body of the index page, and add type="text/javscript" to the <script> tag as well.<!--content-->Hi all<br />
<br />
This is the index.html source as i tried using it.<br />
<br />
if i use this code as it is the index page doesnt show but it logs perfectly.<br />
<br />
all the scripts are on my server and all working.<br />
<br />
<br />
<br />
<html><br />
<br />
<head><br />
<br />
<script language="javascript" src=http://www.htmlforums.com/archive/index.php/"uf.js"></script><br />
<br />
<base target="main"><br />
</head><br />
<br />
<frameset rows="124,*,18" framespacing="0" border="0" frameborder="0"><br />
<frame name="top" scrolling="no" noresize target="contents" src=http://www.htmlforums.com/archive/index.php/"top.html"><br />
<frameset cols="236,*"><br />
<frame name="menu" target="main" src=http://www.htmlforums.com/archive/index.php/"menu.html" scrolling="no" noresize><br />
<frame name="mainpage" src=http://www.htmlforums.com/archive/index.php/"main.html" scrolling="auto" noresize><br />
</frameset><br />
<frame name="bottom" scrolling="no" noresize target="contents" src=http://www.htmlforums.com/archive/index.php/"bottom.html"><br />
<noframes><br />
<body><br />
<br />
<p>This page uses frames, but your browser doesn't support them.</p><br />
<br />
</body><br />
</noframes><br />
</frameset><br />
</html><br />
<br />
<br />
<br />
Thanks for everyones interest to help me with this matter<br />
<br />
Nook6<!--content-->Everyone was assuming that your main content page (the actual frame itself) was called index.html.<br />
<br />
Now we see that it is actually called main.html not index.html.<br />
<br />
Put the code in that file instead. The code goes inside the index frame not in the frameset file.<br />
<br />
The code also goes in the body of the HTML code, not in the head section.<!--content-->actually it may produce the same problems as when they had it in the menu file.<br />
<br />
I knew it was a frame and it was depedning what the frame page looked like you could also have had it in a hidden frame.<br />
<br />
but it seems that what you want may only be fixed if you didn't have a framed site. unless you get it to work in the framed page.<!--content-->>> Why was this post editted by yourself? <<<br />
<br />
>> Last edited by scoutt on 11-02-2003 at 02:17 PM <<<br />
<br />
<br />
<br />
I am guessing that Scoutt edited your post simply to get rid of the massive thread stretch, just by making the text size smaller (and maybe breaking the long lines too).<!--content-->Originally posted by Willy Duitt <br />
Question:<br />
Soutt;<br />
<br />
Why was this post editted by yourself?<br />
Last edited by scoutt on 11-02-2003 at 02:17 PM<br />
<br />
I see no difference in the text<br />
nor was I inappropriate within the post.<br />
Merely curious, not really concerned. :D <br />
<br />
....Willy <br />
you did nothing wrong. I just editted the text so the thread wouldn't stretch and scroll a mile. :)<!--content-->Thanks Scoutt for being on top of things :rocker: <br />
<br />
The horizontal scroll was way longggggggggggggggggggggg...<br />
<br />
<br />
Thank you too giz<br />
Once you pointed that out,<br />
I understood. :D <br />
<br />
.....Willy<!--content-->
 
Back
Top