cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Server-side image map in CForms ?
Date Mon, 23 May 2005 18:27:26 GMT
Luca Morandini wrote:

> Jorg Heymans wrote:
>
>> What is your server-side image map supposed to do ?
>
>
> Very simple stuff:
> 1) An user clicks on the image.
> 2) The form is sent to the server together with mouse coordinates.
> 3) The relevant action is called (mouse coordinates should be sent to 
> the action somehow).
>
> Hmm... I think this image-map widget should be a kind of action 
> widget, since the form is sent to the server when widget is clicked upon.


You already have it :-)

Use an action with <styling type="image">. When the image is clicked, 
the action's event listeners are triggered, and you can read the click 
coordinates using the {action-name}.x and {action-name}.y request 
parameters.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://apache.org/~sylvain            http://anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Mime
View raw message