I'm not able to do a DIV overlay in the place where the click event occurs. I can map the coordinates of the mouse and store these values, but I need when I click on the page, to highlight this place with a circle or a note. I can do this highlighting only by manually entering the coordinates of these coordinates in the CSS and associating with a button:
<style type="text/css">
.divOverlay {
top:586px;
left:647px;
position:absolute;
visibility:hidden;
z-index:500;
}
</style>
<!--Gera o DIV que exibira a marcação da local clicado -->
<script language="javascript" type="text/javascript">
function ShowOverlay(divID, xCoordinate, yCoordinate) {
var divObject = document.getElementById(divID);
divObject.style.visibility = "visible";
divObject.style.left = xCoordinate;
divObject.style.top = yCoordinate;
}
</script>
the DIV that is displayed: (a red circle)
<div id="div1" class="divOverlay"> <img src="../img/local.png" class="img- rounded" alt="Local"> </div>
I need this highlight to occur at the click of the mouse in the clicked place.