Im trying to obtain the IP address of the user, current domain, and full page URL when my javascript is run ( for traffic analysis )
var ip = '<!--#echo var="REMOTE_ADDR"-->';
var domain = document.domain;
var page = window.location;
I keep getting errors in FF3
Error: uncaught exception: [Exception... "Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMLocation.host]" nsresult: "0x80004001 (NS_ERROR_NOT_IMPLEMENTED)" location: "JS frame :: http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js :: anonymous :: line 12" data: no]
Any ideas?
That error is within jQuery - seems unrelated to the code you've pasted.
Edit: it looks like you can't window.location (or page) to an AJAX function - you need to use String (location.href)
or String(page)
or jQuery... could that be it?
I tried the code and works perfectly for me (the newest version of FF - 3.5.5).
Your error message points to http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js, so I think it's related to jQuery.
User contributions licensed under CC BY-SA 3.0