Solved

To Change usemap

Posted on 2001-07-24
4
380 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
Comment Utility
document.plan.src='#1ET';
0
 
LVL 4

Accepted Solution

by:
ravi_raj123 earned 100 total points
Comment Utility
<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
Comment Utility
________________________________________
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
Comment Utility
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now