Hola:
En un formulario con un control "image" (input type="image"), esa imagen hace las veces de submit y a la vez se envían esas coordenadas... claro que tienes que enviar ese form, pero si no quieres hacer ese envío, ouedes poner un target a un popup y desde ahí puedes pasarlas mediante el objeto opener...
popup.html
Código:
<html>
<head>
<title>
coordenadas
</title>
<script type="text/javascript">
function popup() {
if (opener) {
url = location.search.substr(1).split("&");
for (var i = 0, total = url.length; i < total; i ++)
window[url[i].split("=")[0]] = url[i].split("=")[1];
if (window.x != undefined && window.y != undefined)
opener.popup(window.x, window.y)
window.close();
}
}
</script>
</head>
<body onload="popup()">
</body>
</html>
Y la página de la imagen:
Código:
<html>
<head>
<title>
coordenadas
</title>
<script type="text/javascript">
function popup(x, y) {
document.forms.resultado.x.value = x;
document.forms.resultado.y.value = y;
}
</script>
</head>
<body >
<form action="temporal.php" target="_x" method="get" enctype="text/plain" >
<input type="image" src="../miemoticon.gif" />
</form>
<form name="resultado" >
x:<input type="text" name="x" />
y:<input type="text" name="y" />
</form>
</body>
</html>
Saludos