473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

need help on image map

Hello, I want to highlight the clicked area on an image by placing another image
on it. But it replaced the whole image, not the clicked area. My code is as
following, can anyone please help me? Thank you!!!!

<head>
<script language="JavaScript" type="text/javascript">
function changeImagemap(newImage) {
if (js > 1.0) document ['plan'].src = eval(newImage + ".src");
}
</script>
<MAP NAME="MyMap">
<AREA SHAPE="rect" COORDS="216,358,237,378" alt="West Right 5"
onClick="changeImagemap('selected');self.status='s elected';return true" >
<AREA SHAPE="rect" COORDS="216,378,237,398" alt="West Right 4">
<AREA SHAPE="rect" COORDS="216,399,237,419" alt="West Right 3">
<AREA SHAPE="rect" COORDS="216,419,237,439" alt="West Right 2">
<AREA SHAPE="rect" COORDS="216,439,237,459" alt="West Right 1">
<AREA SHAPE="rect" COORDS="270,491,291,511" alt="South Left 1">
<AREA SHAPE="rect" COORDS="289,494,310,514" alt="South Left 2">
<AREA SHAPE="rect" COORDS="310,495,331,515" alt="South Left 3">
<AREA SHAPE="rect" COORDS="330,495,351,515" alt="South Left 4">
<AREA SHAPE="rect" COORDS="349,494,371,515" alt="South Left 5">
<AREA SHAPE="rect" COORDS="369,495,390,515" alt="South Left 6">
<AREA SHAPE="rect" COORDS="390,495,411,515" alt="South Left 7">
</MAP>
</head>

<body>
<p>img name="plan" USEMAP="#MyMap" ismap border="0" src="Plan.jpg" width="837"
height="694"></p>
Jul 23 '05 #1
2 1391
Jay

"Yaqian" <s4******@student.uq.edu.au> wrote in message
news:d3***********@bunyip2.cc.uq.edu.au...
Hello, I want to highlight the clicked area on an image by placing another
image
on it. But it replaced the whole image, not the clicked area. My code is
as
following, can anyone please help me? Thank you!!!!
It replaced one image because you only have one image.
You cannot disect an image - on the fly - with a browser.

Jay

<head>
<script language="JavaScript" type="text/javascript">
function changeImagemap(newImage) {
if (js > 1.0) document ['plan'].src = eval(newImage + ".src");
}
</script>
<MAP NAME="MyMap">
<AREA SHAPE="rect" COORDS="216,358,237,378" alt="West Right 5"
onClick="changeImagemap('selected');self.status='s elected';return true" >
<AREA SHAPE="rect" COORDS="216,378,237,398" alt="West Right 4">
<AREA SHAPE="rect" COORDS="216,399,237,419" alt="West Right 3">
<AREA SHAPE="rect" COORDS="216,419,237,439" alt="West Right 2">
<AREA SHAPE="rect" COORDS="216,439,237,459" alt="West Right 1">
<AREA SHAPE="rect" COORDS="270,491,291,511" alt="South Left 1">
<AREA SHAPE="rect" COORDS="289,494,310,514" alt="South Left 2">
<AREA SHAPE="rect" COORDS="310,495,331,515" alt="South Left 3">
<AREA SHAPE="rect" COORDS="330,495,351,515" alt="South Left 4">
<AREA SHAPE="rect" COORDS="349,494,371,515" alt="South Left 5">
<AREA SHAPE="rect" COORDS="369,495,390,515" alt="South Left 6">
<AREA SHAPE="rect" COORDS="390,495,411,515" alt="South Left 7">
</MAP>
</head>

<body>
<p>img name="plan" USEMAP="#MyMap" ismap border="0" src="Plan.jpg"
width="837"
height="694"></p>

Jul 23 '05 #2
Yaqian wrote:
Hello, I want to highlight the clicked area on an image by placing another
image
on it. But it replaced the whole image, not the clicked area. My code is
as following, can anyone please help me? Thank you!!!!


Try making the image map from a completely transparent image (GIF), layer
under it the actual image you want to use then slide in the higlighting
image between the two layers.

Would that work? I haven't tried it myself.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: no one | last post by:
I have been searching various boards trying to figure out how to generate an image along with other html. I intend to put the image in a table, but for now I am just having problem getting the...
2
by: Mekon | last post by:
I have never written a line of script in my life but I need some help with it now. I have this auto generated code which I want to modify if possible The script generates a strip of...
3
by: Steve | last post by:
Hi, I have a nice little script that works well displaying images on my website. It's a script where if you clik a thumbnail image a pop up window opens that contains a larger version of the same...
14
by: J. Makela | last post by:
Hallo. This should be a pretty entertaining question for you *real* javascript writers.. I, being the lowly photoshop guy at an ad agency made the mistake of actually saying "HTML" in a...
8
by: Tim Geiges | last post by:
Since I am being challenged with learning c# I figured I could pass some of the pain on to you guys :-) I have another question(this one is important for me to fix before I can get my app to Beta)...
3
by: B Maxey | last post by:
I am storing images in a database and need a way to browse those files. I can load the files into an image list or whatever the control needs, but I need a control. It doesn't seem that any of...
5
by: Greg Collins [MVP] | last post by:
I have an ASP.NET page that uses a tag: <asp:Xml id="foo" runat="server" DocumentSource="rss.xml" TransformSource="rss20.xsl" /> This creates a Web page from an XML file that was generated by...
0
by: ameshkin | last post by:
Hi, Im pretty new at PHP and need help with something very simple. I wrote a function which watermarks an image. The function works, but i can't figure out how to output the image into a file. ...
2
by: Beemer Biker | last post by:
I have a 10 row (per page) gridview where the first column is a small image under 100x200px and the second column is a DropDownList template that selects which image to show in the first column. ...
1
by: raghavshastri | last post by:
You are to write a C++ program to perform a statistical analysis of the blobs in an image. The image will be a grayscale image in PGM format for simplicity. Here is a sample PGM image with 10...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.