It will not show up when new users enter my site, and shows an error in the index.php file. Here is the java script

// Visitor tracking Javascript
if(isset($_REQUEST['action'])) {
	if($_REQUEST['action'] == "tracking_script") {
		$visitor = GetClass('ISC_VISITOR');
		$visitor->OutputTrackingJavascript();
	}
	else if($_REQUEST['action'] == "track_visitor") {
		$visitor = GetClass('ISC_VISITOR');
		$visitor->TrackVisitor();
	}

    What error does it show? Does that error concern any of the code you posted?

    Also, that is NOT javascript code. It's PHP. The purpose of it seems to be to possibly send some javascript code to the user.

    All in all, this most likely belongs in the php part of the forum. At least until you resolve your php issues. And if you do need any kind of js help, then making sure the js code is really sent to the browser is a good idea. Posting that code is also a good idea. And wrapping the code in code-tags and indenting it is an excellent idea.

      It's not Java either.

      Also, saying "shows an error" is not enough: quote the error, because 100% of the time what the error message says will be more informative.

      Further, since it's possible that no-one here has your "GetClass" function, or your ISC_VISITOR, nor a definition of the object which that function returns, our entire understanding of what you posted is: "If there is an 'action' field submitted in the request, do one thing if it's equal to 'tracking_script' and some other thing if it's equal to 'track_visitor'." Which isn't enough to go on in the absence of any other information.

      I'll move this to the coding forum, pending this turning out to be a JavaScript error after all.

        Write a Reply...