0
I have a Function that marks the location where a mouse click was given, putting a red circle in the click and saving the coordinates of where this click occurred.
Script that displays the mouse position when clicked on the page.
$(document).ready(function(){
$(document).click(function(e){
document.getElementById('coord').value =( e.pageX + ":" + e.pageY)
});
})
Script that generates the clicked location marking.
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 manner in which the marking is performed
<div class="row" onclick="click_pos(event, this)" id="ele" >
<div id="circle"></div>
<div class="row" id="teste" > </div>
</div>
However, I need another page when loaded, take the sent coordinates and generate the tag at the location of the X:Y coordinate
I can pass this coordinates without problems, but I am not knowing how to load the page with the tag in this coord.
When click will redirect to the other page?
– Miguel
no... first I register, where among the information contained in the form is the X:Y coordinate. And then I recover this information as a result of a search.
– Felipe Oliveira