HTML and CSS Reference
In-Depth Information
There are real estate applications in which an image map of the house floor plan
is used (Figure 5-8). This map allows a potential customer to click a hotspot of a par-
ticular room in the house in order to see pictures or get additional information about
that room. Using an image map like this gives people the opportunity to view houses
for sale online.
create rectangular hotspot
from Family room
Server-Side vs.
Client-Side Image Maps
There are Web sites that
provide information
about server-side versus
client-side image maps.
To see an example of how
image maps can be used
for Web pages and which
type is more efficient, use
a search engine to search
for the terms “server-side
image maps” and
“client-side image maps.”
Figure 5-8 Floor plan can be used as image map.
Server-Side vs. Client-Side Image Maps
Two types of image maps exist: server-side and client-side. In a server-side image
map , the image is displayed by the client (browser) and implemented by a program that
runs on the Web server. When a Web page visitor clicks a link on a server-side image
map, the browser sends the x- and y-coordinates of the mouse click to the Web server,
which interprets them and then links the visitor to the correct Web page based on those
coordinates. Thus, with a server-side image map, the Web server does all the work.
With a client-side image map , the browser does all the work. Most Web developers
prefer to work with client-side image mapping, which does not have to send the x- and
y-coordinates of the mouse click to the Web server to be interpreted. Instead, the coordi-
nates are included in the HTML file along with the URL to which the hotspot will link.
When a visitor to a Web page clicks within a client-side image map, the browser processes
the data without interaction with the Web server.
Server-side image maps have disadvantages. They require additional software in
order to run on a Web server. This requires that the server administrator maintain and
update the server software on a regular basis. Also, an image map available on a particular
Web site's server must be registered to the server before it can be used. Although this pro-
cess is simple, it must be done. Further, all changes to that registered image map must be
Server-Side Image
Maps
When a hotspot on an
image map is clicked,
a special image map
program that is stored
on the Web server is run.
In addition, the browser
also sends the x- and
y-coordinates to the Web
server for the position
of the link on the image
map. Most, if not all,
browsers support
server-side image maps.
 
Search WWH ::




Custom Search