Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
414
Chapter 16 Using HTML Forms
16.8 Server Side Image Maps 
In HTML, an element called 
MAP
 lets you associate URLs with various
regions of an image; then, when the image is clicked in one of the designated
regions, the browser loads the appropriate URL. This form of mapping is
known as a client side image map, since the determination of which URL to
contact is made on the client and no server side program is involved. HTML
also supports server side image maps that can be used within HTML forms.
With such maps, an image is drawn, and when the user clicks on it, the coor 
dinates of the click are sent to a server side program. 
Client side image maps are simpler and more efficient than server side
ones and should be used when all you want to do is associate a fixed set of
URLs with some predefined image regions. However, server side image
maps are appropriate if the URL needs to be computed (e.g,. for weather
maps), the regions change frequently, or other form data needs to be
included with the request. This section discusses two approaches to
server side image maps.
IMAGE Standard Server Side Image Maps
The usual way to create server side image maps is by means of an 
TYPE="IMAGE" ...>
 element inside a form.
HTML Element:
 (No End Tag)
Attributes:
NAME
 (required), 
SRC
, 
ALIGN
This element displays an image that, when clicked, sends the form to the
servlet or other server side program specified by the enclosing form's
ACTION
. The name itself is not sent; instead, name
.x=
xpos and
name
.y=
ypos are transmitted, where xpos and ypos are the coordinates
of the mouse click relative to the upper left corner of the image. 
Second edition of this book: www.coreservlets.com; Sequel: www.moreservlets.com.
Servlet and JSP training courses by book's author: courses.coreservlets.com.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

jsp web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Jsp Web Hosting Cheapest Web Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved