Getting Image coordinates when mouse is clicked on the image andstoring it in a variable
am 03.05.2002 15:26:29 von arun kv
Hello,
Is there any way to get the coordinates value, when an image is clicked.
Say I have created an image link using "mapedit".Instead of linking to
any URL, I want to link to a php file, which returns a value. This value
should be stored in a file against the corresponding coordinate of the
image.
I.e when a mouse is clicked on a image, its coordinates value should
be stored in a variable and the corresponding function should be called
which returns a variable. Both these values should be stored in a
file.
Regards
Arun
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/users-lounge/docs/faq.html
Re: Getting Image coordinates when mouse is clicked on the
am 03.05.2002 19:53:50 von Keary Suska
on 5/3/02 7:26 AM, arun@library.iisc.ernet.in purportedly said:
> Hello,
> Is there any way to get the coordinates value, when an image is clicked.
> Say I have created an image link using "mapedit".Instead of linking to
> any URL, I want to link to a php file, which returns a value. This value
> should be stored in a file against the corresponding coordinate of the
> image.
> I.e when a mouse is clicked on a image, its coordinates value should
> be stored in a variable and the corresponding function should be called
> which returns a variable. Both these values should be stored in a
> file.
>
> Regards
> Arun
If I understand you correctly, you simply want your script to know the exact
coordinates of the click. You could use JavaScript, I am pretty sure, or a
less elegant solution is use an INPUT field type IMAGE. If this type of form
field s give a name, the clicked coordinates are sent as fields "NAME.x" and
"NAME.y" (where NAME is the name of the field).
Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
Re: Getting Image coordinates when mouse is clicked on the
am 03.05.2002 20:38:49 von Scott Marlowe
On Fri, 3 May 2002, Keary Suska wrote:
> on 5/3/02 7:26 AM, arun@library.iisc.ernet.in purportedly said:
>
> > Hello,
> > Is there any way to get the coordinates value, when an image is clicked.
> > Say I have created an image link using "mapedit".Instead of linking to
> > any URL, I want to link to a php file, which returns a value. This value
> > should be stored in a file against the corresponding coordinate of the
> > image.
> > I.e when a mouse is clicked on a image, its coordinates value should
> > be stored in a variable and the corresponding function should be called
> > which returns a variable. Both these values should be stored in a
> > file.
> >
> > Regards
> > Arun
>
> If I understand you correctly, you simply want your script to know the exact
> coordinates of the click. You could use JavaScript, I am pretty sure, or a
> less elegant solution is use an INPUT field type IMAGE. If this type of form
> field s give a name, the clicked coordinates are sent as fields "NAME.x" and
> "NAME.y" (where NAME is the name of the field).
there's a much easier way, just make a form like this:
and when the user clicks on the image, you'll get two vars called:
anna.x and anna.y
You know what they'll contain... :-)
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org