pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Getting Image coordinates when mouse is clicked on the image and storing it in a variable
3+ messages / 3 participants
[nested] [flat]

* Getting Image coordinates when mouse is clicked on the image and storing it in a variable
@ 2002-05-03 13:26 arun kv <arun@library.iisc.ernet.in>
  2002-05-03 17:53 ` Re: Getting Image coordinates when mouse is clicked on the Keary Suska <hierophant@pcisys.net>
  0 siblings, 1 reply; 3+ messages in thread

From: arun kv @ 2002-05-03 13:26 UTC (permalink / raw)
  To: pgsql-php; +Cc: php-xml-subscribe@yahoogroups.com

  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



















^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Getting Image coordinates when mouse is clicked on the
  2002-05-03 13:26 Getting Image coordinates when mouse is clicked on the image and storing it in a variable arun kv <arun@library.iisc.ernet.in>
@ 2002-05-03 17:53 ` Keary Suska <hierophant@pcisys.net>
  2002-05-03 18:38   ` Re: Getting Image coordinates when mouse is clicked on the Scott Marlowe <scott.marlowe@ihs.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Keary Suska @ 2002-05-03 17:53 UTC (permalink / raw)
  To: pgsql-php

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"




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Getting Image coordinates when mouse is clicked on the
  2002-05-03 13:26 Getting Image coordinates when mouse is clicked on the image and storing it in a variable arun kv <arun@library.iisc.ernet.in>
  2002-05-03 17:53 ` Re: Getting Image coordinates when mouse is clicked on the Keary Suska <hierophant@pcisys.net>
@ 2002-05-03 18:38   ` Scott Marlowe <scott.marlowe@ihs.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Scott Marlowe @ 2002-05-03 18:38 UTC (permalink / raw)
  To: Keary Suska <hierophant@pcisys.net>; +Cc: pgsql-php

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:

<form name="test">
<input type="image" name="anna" src="anicole.gif">
</form>

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... :-)




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2002-05-03 18:38 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-05-03 13:26 Getting Image coordinates when mouse is clicked on the image and storing it in a variable arun kv <arun@library.iisc.ernet.in>
2002-05-03 17:53 ` Re: Getting Image coordinates when mouse is clicked on the Keary Suska <hierophant@pcisys.net>
2002-05-03 18:38   ` Re: Getting Image coordinates when mouse is clicked on the Scott Marlowe <scott.marlowe@ihs.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox