if you pass in the event to the function you can use e.pageX and
e.pageY to get the coordinates of the click event

So:


$("#map").click(function(ev) {
   mouseX = ev.pageX;
   mouseY = ev.pageY

}

On May 30, 12:02 pm, Michael Price <[EMAIL PROTECTED]> wrote:
> Hi all,
> Working on something for a client at the moment - they have a map and
> they want to pinpoint where on this map something is, and then store
> this in the database.
>
> I'm thinking we put an image of the map in the admin area for them and
> they can click on it to set the co-ords, but I'm not sure how we'd fetch
> the co-ords of where they clicked? Just as X,Y pixels from the top left
> of the image, nowt too clever.
>
> $("#map").click(function() {
>      // WHAT GOES IN HERE?
>
> }
>
> Does anyone have any thoughts? All help much appreciated :)
>
> Regards,
> Michael Price

Reply via email to