Solved

To Change usemap

Posted on 2001-07-24
4
391 Views
Last Modified: 2010-05-18
Hello,

I've an image with sevarals mapping. But I don't know how to change usemap in the img tag.
My code :

<html>
<head>
<script language=JavaScript>
function ChangeMap()
{
document.plan.usemap='#1ET';
}
</script>
</head>
<body>
<img src="images/Bouguenais1.gif" name="plan" border=0 usemap="#RDC">
<br>
<a href="Javascript:ChangeMap()">Change Map</a>
<map name="RDC">
  <area shape="rect" coords="402,277,452,352" href="#">
  <area shape="rect" coords="454,279,488,351" href="#">
</map>
<map name="1ET">
  <area shape="poly" coords="489,278,520,280,549,318,535,338,532,333,517,332,517,351,489,351" href="#">
  <area shape="poly" coords="522,278,543,248,573,283,550,316" href="#">
</map>
</body>
</html>

To put '#1ET' in usemap property doesn't work.
Why ???
0
Comment
Question by:fabriceb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Expert Comment

by:shlomof
ID: 6311369
document.plan.src='#1ET';
0
 
LVL 4

Accepted Solution

by:
ravi_raj123 earned 100 total points
ID: 6311383
<html>
<head>
<script language="javascript">
function changemap(){
document.frm.plan.useMap="#Map1";
}
</script>
</head>
<body>
<form name="frm">
<map name="Map0">
 <area shape="rect" coords="402,277,452,352" href="#">
 <area shape="rect" coords="454,279,488,351" href="#">
</map>

<map name="Map1">
<area shape="poly" coords="489,278,520,280,549,318,535,338,532,333,517,332,517,351,489,351" href="#">
 <area shape="poly" coords="522,278,543,248,573,283,550,316" href="#">
</map>

<img name="plan" border="0" src="map.jpg" usemap="#Map0">
<a href="javascript: changemap()">Change Map</a>
</form>
</body>
</html>


GOOD LUCK...:)
0
 
LVL 12

Expert Comment

by:lexxwern
ID: 7152087
________________________________________
do not accept this comment as the answer

this question has been abandoned. experts please
post recommendations below to help the moderators.



________________________________________
my recommendation
points to ravi_raj123
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7181513
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

634 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question