Hi all
I want to make a statistics script for my website by javascript I know that I can do it by this script:
<script type="text/javascript" src="http://www.mywebsite.com/stat.php"></script>
But I need to pass some parameters to stat.php for example I need pass the value of window.location
how can I do that?
Thanks

try using jQuery, like this at the end of your document just before closign body

<script type="text/javascript">
$(document).ready(function(){
	$("head").append("<script src='stat.php?loc=" + window.location + "'><//script>")
})
</script>

For sure there's some better way to perform this but give it a try and see if it works.

HTH

.::AleX::.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.