[Mapserver-users] How to get X and Y pixel coordinates with JavaScript
Merlos
merlos at tsc.uvigo.es
Tue Jul 20 15:44:46 PDT 2004
Hello,
Maybe someone can help me. I was wondering if when an user clicks on the
image that is on an <input type="image"> element it is possible to capture
the X and Y coordinates before the submission is done. I mean:
<script type="text/javascript">
function formSubmit() {
//Here get the X and Y coords in pixels... Is it possible? How?
}
<form name="apatruyando" action="JavaScript:formSubmit()">
<input type="image" src="image_url.png" />
</form>
The idea is to change with the JS the image src atribute of the input type
each time the user clicks on, that way it wouldn't be necessary to refresh
all the page.
Thank you.
More information about the MapServer-users
mailing list