1 Reply Latest reply on Dec 14, 2007 1:43 PM by Günter Schenk

    NeXTensio Form + click on image for x y coordinates

    Level 1
      Hi all, I've been asked to implement a feature into a NeXTensio form
      containing two fields "x" and "y",
      so the user can click on an image to insert the x and y coordinates into the

      How would you implement something like that?
      I've tried using
      but clicking on that
      image reloads the page.
      Is there some way to retrieve the coordinates of a click on on image field
      without having the click invoke submit?


        • 1. Re: NeXTensio Form + click on image for x y coordinates
          Günter Schenk Level 4
          Hi Joris,

          you can do that with a real image plus some javascript to store the x and y coordinates in two separate fields.

          1) Here´s an external javascript example which provides the basics:


          2) the function recordCoords() will need some slight modification to spread the values across two input fields:

          document.getElementById('x_field').value = xCoord;
          document.getElementById('y_field').value = yCoord;

          3) the img tag will need an onclick="recordCoords();" to trigger what´s mentioned in 2)

          worked fine for me so far

          Günter Schenk
          Adobe Community Expert, Dreamweaver