PDA

View Full Version : Ultimate Fade-In Slideshow - Hyperlink Problem



lilredraider
07-22-2010, 07:37 PM
1) Script Title: Ultimate Fade-In Slideshow (v1.51)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem: We currently have this slideshow running on our site. But when someone clicks on a picture, it goes to a nonexistent page. How can I make it to where you cannot click on the links?

I am sorry for what is probably a "duh" question, but I am brand-new to this!

Thanks for any and all replies!

azoomer
07-22-2010, 08:10 PM
here is a section of the documentation (http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm)

imagearray: [
["pool.jpg"],
["http://mysite.com/cave.jpg", "http://cnn.com"],
["fruits.jpg", "http://cnn.com", "_new"],
["dog.jpg", "", "", "This image has a description but no hyperlink"] //<--no trailing comma after very last image element!
],
just remove the link (red) so that it looks like in the last row of the image array (blue)

lilredraider
07-22-2010, 09:41 PM
I am so sorry, but I don't see any links in the coding. The site is www.lubbockag.com.

azoomer
07-22-2010, 09:56 PM
Yes you are right. Apparently the old version of the script is considerably different from the newer versions. There can be different workarounds to obtain what you want, but it might be easier to just upgrade to the new version 2.4.

azoomer
07-22-2010, 10:22 PM
If you don't want to upgrade then one way you could stop the link is to find this


fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
slideHTML+='</a>'
picobj.innerHTML=slideHTML
}

And the replace the red part with this
slideHTML='<a href="javascript: void(0)">'
But this is a quick fix that isn't too elegant, but I guess it will work.
I am not to familiar with this version so I think there will be better ways to do it.

Edit:
It seems to work better when i comment out the two lines shown in red, like this


fadeshow.prototype.populateslide=function(picobj, picindex){
var slideHTML=""
if (this.theimages[picindex][1]!="") //if associated link exists for image
// slideHTML='<a href="'+this.theimages[picindex][1]+'" target="'+this.theimages[picindex][2]+'">'
slideHTML+='<img src="'+this.postimages[picindex].src+'" border="'+this.imageborder+'px">'
if (this.theimages[picindex][1]!="") //if associated link exists for image
// slideHTML+='</a>'
picobj.innerHTML=slideHTML
}

This removes the link and will also get rid of the pointer

lilredraider
07-23-2010, 01:42 PM
I can't thank you enough! Have a wonderful day!

zalia
08-20-2010, 12:35 PM
Hi Azoomer, I also have a problem with my hyperlinks in the Ultimate Fade-in slideshow. When you click on them they refer to a template folder even though in the code it just has the url, see http://www.panesarsimone.com/news/index.html.

When I try setting the slideshow up in a different web it works fine, I'm so stuck! What am I doing wrong?

azoomer
08-20-2010, 02:33 PM
Hi Zalia, First you may have to clear you browsers cache and second: you need to delete an extra comma. This is part of your code

<script type="text/javascript">
var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [200, 200], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["../images/news/mpdclick.gif", "http://www.mpdclick.com/mudpie/newsletter/2010/trends/11.06.10/newsletter_trends.html", "_blank"],
["../images/news/fashion_forum.gif", "http://translate.google.co.za/translate?hl=en&sl=da&u=http%3A%2F%2Fwww.fashionforum.dk%2F&ei=gU8jTKXID8iQjAfe-Ykq&sa=X&oi=translate&ct=result&resnum=1&ved=0CBkQ7gEwAA&prev=%2Fsearch%3Fq%3Dhttp%3A%2F%2Ffashionforum.dk%2F", "_blank"],
],
displaymode: {type:'auto', pause:3000, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""
})
</script>

Delete the red comma ( scroll all the way to the right to see it ) and the show should work in internet explorer as well ( hopefully).

Edit: Okay, it turns out to be a little more tricky than I thought at first. I can't really figure out why it is leading to another address than the one you have in the image arrays. I will try to look at it some more, but we may need further assistance.
It almost seems like there is some .htaccess modification

Edit: I'm sorry to say it but I'm not able to understand why this: http://www.panesarsimone.com/Templates/ is "prepended" to the link urls in the image arrays. Maybe someone else could have a go at it ?

edit: Thanks John, learning from you every day

jscheuer1
08-20-2010, 03:23 PM
Your copy of fadeslideshow.js has been altered here:


setting.closebutton=(setting.descreveal=="always")? '<img class="close" src="../Templates/'+closeb . . .

and several other places to point to this Templates folder. I've seen this sort of thing happen before many times, though I'm not sure what the cause is, unless you did some kind of global search and replace on the script. In the other cases it was never clear if this had happened or not.

But the solution is simple, download a fresh copy of the fadeslideshow.js script and use that instead of your current altered copy.

azoomer's remark about the (red) comma is still valid.