I have a function that marks the place where a mouse click was made, putting a red circle on the click and saving the coordinates of where this click occurred.
Script that displays the mouse position when you click the page.
$(document).ready(function(){
$(document).click(function(e){
document.getElementById('coord').value =( e.pageX + ":" + e.pageY)
});
})
Script that generates markup of the clicked place.
function click_pos(e, ele) {
var x = e.pageX;
var y = e.pageY;
circle = document.getElementById('circle');
circle.style.left = x-15 + 'px';
circle.style.top = y-152+ 'px';
circle.style.display = 'block';
}
The way the markup is executed
<div class="row" onclick="click_pos(event, this)" id="ele" >
<div id="circle"></div>
<div class="row" id="teste" > </div>
</div>
But I need another page when loaded, take the sent coordinates and generate the mark in place of the X coordinate: Y
I can pass this coordinates without problems, but I am not sure how to load the page with the tag in this coord.