Skip navigation
Currently Being Moderated

Links are not working in Prototype Fisheye

Oct 14, 2010 7:48 PM

I saw that there was another thread about this same issue but unfortunalety the response did not work for me!  Any suggestions on how to get the links to work? I added the url to the href tag within the img tag but the links don't work. example:

 

       <img src= "PrototypeFishEye/images/forms.png" href="forms.html" title="Forms" alt="Forms"/>

 

 

 

I have also tried simply adding <a href></a> around each image and that does NOT work either. example:

 

<a href="forms.html"><img src= "PrototypeFishEye/images/forms.png" href="forms.html" title="Forms" alt="Forms"/></a>

OR

<a href="forms.html"><img src= "PrototypeFishEye/images/forms.png" href="#" title="Forms" alt="Forms"/></a>

OR

<a href="forms.html"><img src= "PrototypeFishEye/images/forms.png"  title="Forms" alt="Forms"/></a>

 

HELP!

 

Thanks

 
Replies
  • Currently Being Moderated
    Oct 18, 2010 5:00 PM   in reply to brandon.bullock

    It is a bug in the Javascript code the two variable names PrototypeFishEye and PrototypeFishEyelinkRelay need to be swapped like below:

     

     

    var PrototypeFishEyelinkRelay = function(e){
            var ele = Event.element(e);
            var href = ele.getAttribute("href");
            alert(href);
            window.location = ele.getAttribute("href");

    }


    var PrototypeFishEye = new FishEyeToolBar("PrototypeFishEye");
    PrototypeFishEye.addEventListener("itemClick", PrototypeFishEyelinkRelay);

     

     

    If you swap these and replace the anchor links in the <mg href="#" /> with a url like below it should work.

     

    <img src="PrototypeFishEye/images/My-PC.png" href="products.html" title="Products" alt="Products" />

     

     

    If you click on Details in the Widget Browser, then click on the Stars rating it will bring you to the page for the Widget in the Exchange.  It lists reviews and if the author provided an email it is listed there. You can post issues here and contact the author directly if they provide an email link (this author does not).  I will post this fix in the review for this widget, and will try to contact the Widget Author to have them post a fix

     

    -Scott Richards

    Dreamweaver Team

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 22, 2012 8:00 AM   in reply to Scott DRichards

    I've set this up the way you suggest and when i click on the image, it brings up a 'javascript alert' box and i have to click on 'ok' in order to go to the image, which i don't want.. Also, this doesn't work in IE 9. any suggestions?

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 20, 2012 11:05 AM   in reply to Margie Hansen

    Hi Margie. I removed -  alert(href); from the changes, scott highlighted above.

    Im always disappointed with anything to do with Internet explorer. It astonishes me that such a big player such as microsoft, fail to achieve what can be viewed in all other platforms. Chrome, Firefox, Safari.....sorry i cant help

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 20, 2012 11:31 AM   in reply to rasklit

    I've actually fixed it since then and the links are working. I had to put an if then else statement in for IE and now it's working in Chrome, FF, and IE. I totally agree with you on IE. This is what I ended up with on the javascript:

     

    <script type='text/javascript'>

              var PrototypeFishEye = function(e){

                  var ele = Event.element(e);

                        window.location = ele.getAttribute("href");

              }

     

     

              var PrototypeFishEye = new FishEyeToolBar("PrototypeFishEye", { createSub : function(ele, options){

     

                        return new FishEyeItemDown(ele, options);

     

              }});

     

    //          var rightEye = new FishEyeToolBar("fishEyeBottom");

     

    //          rightEye.addEventListener("itemClick", PrototypeFishEyelinkRelay);

     

     

              PrototypeFishEye.addEventListener("itemClick", PrototypeFishEye);

     

     

    </script>

     

    I'm working from a server address at the moment, so I've taken out the actual address, but IE would not recognize the links with a slash '/' in front of the file name, but Firefox wouldn't recognize it without it. So here's what I did:

     

    <!-- script for fisheye and general css -->

    <script src="/../PrototypeFishEye/includes/prototype.js" type="text/javascript"></script>

    <script src="/../PrototypeFishEye/includes/effects.js" type="text/javascript"></script>

    <script src="/../PrototypeFishEye/includes/EventDispatcher.js" type="text/javascript"></script>

    <script src="/../PrototypeFishEye/includes/FishEye.js" type="text/javascript"></script>

     

     

    <!-- IE needs to use a different scriptpath to work -->

    <!--[if lte IE 9]>

    <script type="text/javascript" src="S:/../includes/prototype.js"></script>

    <script type="text/javascript" src="S:/../PrototypeFishEye/includes/effects.js"></script>

    <script src="S:/../PrototypeFishEye/includes/EventDispatcher.js" type="text/javascript"></script>

    <script src="S:/../PrototypeFishEye/includes/FishEye.js" type="text/javascript"></script>

    <![endif] -->

     

    Message was edited by: Margie Hansen

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points