Hiii hello i am newbie here…i need a help with script…
[CODE]
<script type=text/javascript>
var isIE = document.all?true:false;
if (!isIE) document.captureEvents(Event.MOUSEMOVE);
document.onmousemove = getMousePosition;
function getMousePosition(e) {
var posX;
var posY;
if (!isIE) {
posX = e.pageX;
PosY = e.pageY;
}
if (isIE) {
posX = event.clientX + document.body.scrollLeft;
posY = event.clientY + document.body.scrollTop;
}
top.leftFrame.location=’simpan.php?x=’+posX+’&y=’+posY;
document.getElementById(“coord_x”).value=’simpan.php?x=’+posX;
document.getElementById(“coord_y”).value=’simpan.php?y=’+posY;
return true;
}
</script>
<form method=”POST” action=”simpan.php”>
<input type=”hidden” name=”coord_x” id=”coord_x” value=””>
<input type=”hidden” name=”coord_y” id=”coord_y” value=””>
</form>
from above script i would like to collect the posX and posY and use it as value. And from that value i can post the value to database…please is my code above is right??? because i try it ….it working to get mouse position but cannot store the posX & posY into DB..it only show 0 value….and one more thing how can i use array for that code above..i mean …i would like to store maybe 100 data of posX & 100 data for posY…how can i do that..pleas someone…