Creating the Image Map : JavaScript DHTML examples (example source code) » HTML » Image Map

JavaScript DHTML










Java Products
Java Articles
JavaScript DHTML Home  »   HTML   » [  Image Map  ]   

 
Creating the Image Map

Please note that some example is only working under IE or Firefox.


/*
Mastering JavaScript, Premium Edition
by James Jaworski 

ISBN:078212819X
Publisher Sybex CopyRight 2001
*/
<HTML>
<HEAD>
<TITLE>Client-Side Image Maps</TITLE>
<SCRIPT LANGUAGE="JavaScript"><!--
function goWhatsNew() {
 parent.frames[1].location.href="whatsnew.htm"
}
function goProducts() {
 parent.frames[1].location.href="products.htm"
}
function goCompany() {
 parent.frames[1].location.href="company.htm"
}
function goField() {
 parent.frames[1].location.href="field.htm"
}
// --></SCRIPT>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<MAP NAME="bizmap">
  <AREA NAME="whatsNew" COORDS="219,250,50" shape="circle"
   HREF="javascript:void(0)" onMouseOver="goWhatsNew();
     return true">
  <AREA NAME="products" COORDS="205,226,100" shape="circle"
   HREF="javascript:void(0)" onMouseOver="goProducts();
     return true">
  <AREA NAME="company" COORDS="192,202,155" shape="circle"
   HREF="javascript:void(0)" onMouseOver="goCompany()">
  <AREA NAME="field" COORDS="183,189,188" shape="circle"
   HREF="javascript:void(0)" onMouseOver="goField()">
</MAP>
<IMG SRC="http://www.java2s.com/style/logo.png" BORDER="0" USEMAP="#bizmap">
</HTML>
Related examples in the same category
1.   Image Map Event Handling
2.  Methods and Properties of the Area Object








Home| Contact Us
Copyright 2003 - 04 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.