Image Map Rollover Problem

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Image Map Rollover Problem

    Hi Guys,

    I am trying to get an image map to display rollovers on a separate image
    somewhere else on the page.. i have copied the code bit for bit from a site..
    and the demo on the site works on my browser.. but my version won't work for
    me.. here is the code:

    Any ideas why it's not working??

    Thanks,

    Mike


    <script language="JavaScript" type="text/JavaScript">
    <!--
    origimage = new Image();
    origimage.src = "image1.gif";

    image2on = new Image();
    image2on.src = "image2.gif";
    image3on = new Image();
    image3on.src = "image3.gif";
    image4on = new Image();
    image4on.src = "image4.gif";

    function imageon(name) {
    document.altimg.src = eval(name + "on.src");
    }
    function imageoff(name) {
    document.altimg.src = eval(name + ".src");
    }

    function on(name) {
    imageon(name);
    }
    function off(name) {
    imageoff(name);
    }
    // -->
    </script>

    Mike Davis OZ Guest

  2. Similar Questions and Discussions

    1. Rollover image
      hope some of u guys can pleae help me out. i've tried to use the rollover image for my site. however, when i preview my design on browser it wont...
    2. Datagrid rollover Image
      Hello, Ive created a datagrid and inserted a table for displaying images. i have four small images and one large image. I want to replace the...
    3. rollover image problem
      Hey out there. I've created three interactive rollover menu images which when the mouse passes over them they play an animated gif. The inactive...
    4. Image Swapping (Not Rollover)
      I have an online portfolio to display my photography work, and on one page i have a list on the left, and i have the photographs on the right, i want...
    5. Rollover and slice image off
      Martin, THanks for the reply. I was using the Insert Fireworks button within DWMX; not sure about a spacer gif though. what is that and how can...
  3. #2

    Default Re: Image Map Rollover Problem

    Sorry.. second part of code:



    <img src="blockright2.gif" width="266" height="241" border="0" usemap="#Map"
    />
    <map name="Map" id="Map">
    <area shape="rect" coords="25,114,81,135" href="#" />
    <area shape="rect" coords="107,86,161,107" href="#"
    onmouseover="on('image2');" onmouseout="off('origimage')" />
    <area shape="rect" coords="78,136,133,157" href="#"
    onmouseover="on('image3');" onmouseout="off('origimage')" />
    <area shape="rect" coords="119,110,178,129" href="#"
    onmouseover="on('image4');" onmouseout="off('origimage')" />
    </map>

    Mike Davis OZ Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139