Why does rollover image swap only work on macs and not PC?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gilda Horgan

    #1

    Why does rollover image swap only work on macs and not PC?

    Hi all,
    I have created an image map for my home page with multiple hot spots that swap out the main image for another. It is built in a gallery with CSS and html. I started with a template and modified. The swap on hover is critical to the home page, but it is only working on macs and not on pcs.

    Here's the site:
    http://www.getcreative sense.com

    I welcome any advice. I am a novice programmer and only know the basics.
    Thank you.
  • Gilda Horgan

    #2
    Actually, I was told the problem may be with internet explorer versus safari. I added the # to the image map so ie will recognize, but it is still not working for my ie testers.

    Comment

    • JKing
      Recognized Expert Top Contributor
      • Jun 2007
      • 1206

      #3
      Start by validating your page. You have several errors that should be corrected.

      To validate your page you can go here.

      You have delcared a function roll as follows:
      Code:
      function roll(img_name1, img_src1, img_name2, img_src2)
         {
         document[img_name1].src = img_src1;
         document[img_name2].src = img_src2;
         }
      You have declared four parameters for the function but you only pass in two when you call the function.

      Comment

      • Gilda Horgan

        #4
        The # worked, I just needed to place it only when I first list the image map name, not the second time:

        Code:
        <dt><img name="target" alt="" src="images/head.main.home.jpg" usemap="#HeadRollovers" /></dt>
                       			<dd>
                       				<map name="HeadRollovers">
        I also deleted the second image source in the parameters as you suggested:

        Code:
        function roll(img_name1, img_src1)
           {
           document[img_name1].src = img_src1;
           }
        But the need for the # was what was tripping up internet explorer. Thanks everyone.

        Comment

        Working...