Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

To Change usemap

Posted on 2001-07-24
4
Medium Priority
?
406 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 400 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
This article discusses how to implement server side field validation and display customized error messages to the client.
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

971 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