need help on image map

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Yaqian

    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="JavaS cript" 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="change Imagemap('selec ted');self.stat us='selected';r eturn 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>


  • Jay

    #2
    Re: need help on image map


    "Yaqian" <s4041650@stude nt.uq.edu.au> wrote in message
    news:d3qrir$15p k$1@bunyip2.cc. uq.edu.au...[color=blue]
    > 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!!!![/color]

    It replaced one image because you only have one image.
    You cannot disect an image - on the fly - with a browser.

    Jay

    [color=blue]
    > <head>
    > <script language="JavaS cript" 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="change Imagemap('selec ted');self.stat us='selected';r eturn 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>
    >
    >[/color]


    Comment

    • PDannyD

      #3
      Re: need help on image map

      Yaqian wrote:
      [color=blue]
      > 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!!!![/color]

      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.

      Comment

      Working...