Hi Rolf,
Lets give this a try. Here is some javascript code in a html page. It picks up the mouse position when the header is clicked.
<!DOCTYPE html>
<html>
<body>
<h2 onclick="showCoords(event)">Click this heading to get the x (horizontal) and y (vertical)
coordinates of the mouse pointer when it was clicked.</h2>
<p><strong>Tip:</strong> Try to click different places in the heading.</p>
<p id="demo"></p>
<script>
function showCoords(event) {
var x = event.clientX;
var y = event.clientY;
var coords = "X coords: " + x + ", Y coords: " + y;
document.getElementById("demo").innerHTML = coords;
}
</script>
</body>
</html>
save this code in a text file: I named it page4.html
now deploy it:
CloudDeploy[
Import["E:\\page4.html", "Source"], "page4.html", "Permissions" -> "Public"]
looks something like this:
note: I save the html/javascript code to a file and then use Import with "Source". The quotes in the html are then auto escaped. If i do this manually I always make one or more mistakes (with the /")