Re: Some Programing Needed
From: Joe Smith (joe_at_inwap.com)
Date: 12/29/04
- Next message: Joe Smith: "Re: save & restore cursor position in perl"
- Previous message: PerlFAQ Server: "FAQ 9.3: How can I get better error messages from a CGI program?"
- In reply to: bigmur77_at_hotmail.com: "Re: Some Programing Needed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 29 Dec 2004 03:19:41 -0800
bigmur77@hotmail.com wrote:
> Joe Smith wrote:
>
>>Murray J wrote:
>>
>>>I would like to capture the co-ordinates of
>>>the mouse at the instant when it is clicked on the first image,
>>
>>Read up on HTML documentation on the ISMAP attribute of <IMG>.
>>
>
> ISMAP sends the co-ordinates to some program on a server.????
Why so many question marks? The ISMAP attribute has been
around for ages, possibly HTML version 1 or 2. It was used
over ten years ago by the Xerox PARC Map Viewer
(http://www2.parc.com/istl/projects/mapdocs/).
http://www.htmlhelp.com/reference/html40/special/img.html
Another way of doing it (used by MapQuest and such) is to use
<input type="image" src="first-image.png">
in the middle of a FORM.
http://www.htmlhelp.com/reference/html40/forms/input.html
When the graphical submit button is clicked, the coordinates
of the click are sent with the form submission as name.x=x-value
and name.y=y-value where name is the value of the NAME attribute,
x-value is the click's pixels from the left of the image, and
y-value is the click's pixels from the top of the image.
>>>apply some mathematics based on which 'hot spot' was
>>>clicked, and come up with a new set of co-ordinates.
>>
>>That's pretty trivial. What have you tried?
>
> Trivial only to those who know the answer.
I meant that once you get the coordinates from the browser,
the math is trivial. Agreed: getting the coordinates can
be daunting if you haven't checked reference material.
>>>When the destination page is opened, I would like the viewport to
>>What's a viewport?
>
> Screen 800 X 600
> Image 3200 X 2560
> Viewport - that 800 X 600 window I look through.
If you're using a browser, you won't get the full 800x600.
The browser provides a window typically 740 x 500 with scroll
bars. The position of the browser's scroll bars is not
something under a web server's control.
-Joe
- Next message: Joe Smith: "Re: save & restore cursor position in perl"
- Previous message: PerlFAQ Server: "FAQ 9.3: How can I get better error messages from a CGI program?"
- In reply to: bigmur77_at_hotmail.com: "Re: Some Programing Needed"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]