cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: ImageMap: is it still "eww !" ?
Date Thu, 09 Jun 2005 12:04:01 GMT
Luca Morandini wrote:
> The form definition:
> <fd:imagemap id="map">
>     <fd:source>test.gif</fd:source>
>     <fd:hint>
>         <i18n:text>zoomInImage.hint.mapButton</i18n:text>
>     </fd:hint>
>     <fd:on-action>
>         <javascript>onClickMap(event);</javascript>
>     </fd:on-action>
> </fd:imagemap>
> 
> The flow:
> function onClickMap (event) {
> 
>     var x= event.getX();
>     var y= event.getY();
>     var uri;
>     
>     uri= map.zoomIn(new Rectangle(new Point(x, y), 1, 1));
>     if ( uri != "map.zoominTooFar" ) {
>         event.getSource().setImageURI(uri);
>     }
> }
> 
> How about this, Vadim ? ;)

Excellent!

Vadim

Mime
View raw message