Solved

To Change usemap

Posted on 2001-07-24
4
382 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
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

776 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