Forum Moderators: coopster
I am running xanga tracker site~
I have a "NaN" error in mysql.
After I moved my database from old server to new server.
There is a "NaN" add to mysql database automatically. And it happened to the old server too.
Example,
It should show as:
======
Page Viewed:http://www.example.com/username
Referrer:http://www.example.com/private/yourhome.aspx?user=another-username
================
However, it shows with the "NaN" error,
========
Page Viewed:NaNhttp://www.example.com/private/yourhome.aspx?user=another-username
Referrer:
================
The Referrer shows in "Page Viewed" accidently with "NaN" is added automatically.
And the "Page Viewed" is disappeared.
I need some advise to help me fix this "NaN error".
I research in google, and I dont think it help.
ref, this is our code,
<script type='text/javascript'>
var xanga = "username";
var from_url = escape(document['referrer']);
var links = document.getElementsByTagName('a');
for (var i=0; i<links.length; i++) {
if (links[i].href.match('http://www.example.com') && links[i].innerHTML.match('xanga') && (links[i+2].href.match
('/logout.aspx') ¦¦ links[i+2].href.match('/signin.aspx'))) {
document.write('<img src="http://www.example.com/process.php?xanga='+xanga.toLowerCase()+'&visitor='+links
[i+1].innerHTML.toLowerCase()+'&url=' + document.location+'&ref='+from_url +'" width="0" height="0">');
}
}
</script>
[edited by: coopster at 7:04 pm (utc) on Jan. 2, 2007]
[edit reason] generalized domain [/edit]
or do you use some tool, eg
[alexa.com...]
?
Cause I don't see a chance of doing what you need with xanga.com. At least not on this forum (which is php forum)
I suggest putting in alerts to see what values you are getting back.