PHP Classes

File: click-tale.js

Recommend this page to a friend!
  Classes of Frederik Yssing   Click-tale   click-tale.js   Download  
File: click-tale.js
Role: Auxiliary data
Content type: text/plain
Description: the javascriptfile.
Class: Click-tale
Track user clicks on pages and show a click graph
Author: By
Last change: bug fixed
Date: 11 years ago
Size: 642 bytes
 

Contents

Class file image Download
// set-up to use onclick document.onclick = getClickXY; var IE = document.all?true:false function getClickXY(e){ var tempX = 0; var tempY = 0; if (document.captureEvents) { var loc = window.location.pathname; if (IE) { // grab the x-y pos.s if browser is IE tempX = event.clientX + document.body.scrollLeft; tempY = event.clientY + document.body.scrollTop; scrollval = $(window).scrollTop(); } else { // grab the x-y pos.s if browser is NS tempX = e.pageX; tempY = e.pageY; } $.get('click-tale.php?x='+tempX+'&y='+tempY+'&url='+loc, function(data) { //alert(data); }); } }