Imagemap"

From Documentation
Line 9: Line 9:
 
= Employment/Purpose =
 
= Employment/Purpose =
  
Space is a Separator with the orient default to "horizontal".
+
A <tt>imagemap</tt> component is a special image. It accepts whatever properties an <tt>image </tt>component accepts. However, unlike <tt>image</tt>, if a user clicks on the image, an <tt>onClick</tt> event is sent back to the server with the coordinates of the mouse position. In contrast, the <tt>onClick </tt>event sent by <tt>image</tt> doesn't contain the coordinates.
 
 
In other words, <space> is equivalent to <separator orient="horizontal">
 
  
 +
The coordinates of the mouse position are screen pixels counted from the upper-left corner of the image beginning with (0, 0). It is stored as instance of <tt>org.zkoss.zk.ui.event .MouseEvent</tt>. Once the application receives the <tt>onClick</tt> event, it could examine the coordinates of the mouse position from the <tt>getX</tt> and <tt>getY</tt> methods.
  
 +
For example, if a user clicks 208 pixels over and 205 pixels down from the upper-left corner of the image displayed from the following statement.
  
 
= Example =
 
= Example =

Revision as of 03:46, 18 May 2010

Imagemap

Employment/Purpose

A imagemap component is a special image. It accepts whatever properties an image component accepts. However, unlike image, if a user clicks on the image, an onClick event is sent back to the server with the coordinates of the mouse position. In contrast, the onClick event sent by image doesn't contain the coordinates.

The coordinates of the mouse position are screen pixels counted from the upper-left corner of the image beginning with (0, 0). It is stored as instance of org.zkoss.zk.ui.event .MouseEvent. Once the application receives the onClick event, it could examine the coordinates of the mouse position from the getX and getY methods.

For example, if a user clicks 208 pixels over and 205 pixels down from the upper-left corner of the image displayed from the following statement.

Example

Supported events

Name
Event Type
None None

Supported Children

*NONE

Use cases

Version Description Example Location
     

Version History

Version Date Content
5.0.2 5/19/2010 Initialization



Last Update : 2010/05/18

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.