Hello I am currently working on a project but I am currently stuck, what I'm trying to do is add a simple PHP site hit counter to an ajax site which counts the # of visits to an specific page, now I gotten the pages to show up and they are .php but the values lets say 10 which is the # of visits to that page will not show up, please help me, if you need any further information please let me know. I attached the files so you can play with it, don't forget to upload it to your host, the ajax site will now work locally.

Download: http://bit.ly/gMcdBO

Member Avatar

Ho ho. Me no downloady. Just print your code here.

I can't understand the problem - this must be one of the longest sentences DW has had!

>values lets say 10 which is the # of visits to that page will not show up

I assume that this is the key part?Like I said, show your code.

Lol, says I have to wait 40 minutes to download your file, no thanks.

ok so if the number is xyz [eg: 123] recursively add the img elements corresponding to each digit from the right till the number reduces to 0.

from what you posted it seems you can do 0 to 9 ut ur stuck at 10

I have re-upload the file here http://bit.ly/hYjWNL, The problem is not with the PHP counter its really the ajax site because the PHP Hit Counter will show up If I added to a blank .php file but If its implemented into the ajax site than the php is not been called. I have check this whith firebug.

jQuery script

var default_content="";

	$('ul li a').click(function (e){


	//filling in the default content
	default_content = $('#pageContent').php();

var lasturl="";

function checkURL(hash)
	if(!hash) hash=window.location.hash;
	if(hash != lasturl)
		// FIX - if we've used the history buttons to return to the homepage,
		// fill the pageContent with the default_content

function loadPage(url)
		type: "POST",
		url: "load_page.php",
		data: 'page='+url,
		dataType: "php",
		success: function(msg){

Member Avatar


What does this do? I've never seen the .php method/property in jQuery.

Member Avatar

No thank you, no downloads. Good luck.