Thanks for your support with this. Using your examples we managed to include an image of a sandpit which when clicked on passes the x and y position of the mouse back to Medialab.
Our code here:
<html>
<head>
<script language="JavaScript">
function point_it(event){
var pos_x=0;
var pos_y=0;
pos_x = event.offsetX?(event.offsetX):event.pageX-document.getElementById("pointer_div").offsetLeft;
pos_y = event.offsetY?(event.offsetY):event.pageY-document.getElementById("pointer_div").offsetTop;
document.getElementById("<ml.varname>_01").value = pos_x;
document.getElementById("<ml.varname>_02").value = pos_y;
document.sandpit.submit();
}
</script>
</head>
<body>
<style>
input.check {height: 50px; width: 50px;}
<ml.styles>
</style>
<form name="sandpit" method="post">
<div id="pointer_div" onclick="point_it(event)" style = "background-image:url('sandpit.jpg');width:928px;height:593px; ">
</div>
<br><br>
<ml.wording>:<br><br>
<input type="hidden" name="<ml.varname>_01"><br>
<input type="hidden" name="<ml.varname>_02"><br>
</form>
</body>
</html>