PDA

View Full Version : How to remove/disable slideshow hyperlinks



HSRyan
01-14-2010, 08:06 PM
Script Title: Blending Image Slide Show Script

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

Problem:

Hello, the 'corresponding hyperlinks' feature is certainly valuable in most cases - but not in others - so I'm hoping there's a way to completely disable it.

I did search the forum (and the web) but have come up empty. I'm not very literate in code so much of the script is quite cryptic to me!

Note: I don't have any 'corresponding links' in the script but the image/slideshow is still a hotspot, and if you click it, it naturally generates a script error.

The code is below - and here's the live page: http://ryancreative.com/cupe4000/

Hopefully that makes sense and there's a simple solution, otherwise I'll be forced to link it to "something"... which I prefer not to do.

Thanks in advance!

Steve

Header Part



<script language="JavaScript1.1">
<!--

//*****************************************
// Blending Image Slide Show Script-
// Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit http://www.dynamicdrive.com/
//*****************************************

//specify interval between slide (in mili seconds)
var slidespeed=4000

//specify images
var slideimages=new

Array("images/slideshow/homepage425x240a.jpg","images/slideshow/homepage425x240b.jpg","images/slideshow/homepage425x240c.jpg","images/slideshow/homepage425x240d.jpg")



var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}

//-->
</script>


Body Part



<a href="javascript:gotoshow()"><img src="homepage425x240a.jpg" alt="CUPE 4000" name="slide" border=0 style="filter:blendTrans(duration=1)" width=425 height=240></a>

<script language="JavaScript1.1">
<!--

var whichlink=0
var whichimage=0
var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
function slideit(){
if (!document.images) return
if (ie) document.images.slide.filters[0].apply()
document.images.slide.src=imageholder[whichimage].src
if (ie) document.images.slide.filters[0].play()
whichlink=whichimage
whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
setTimeout("slideit()",slidespeed+blenddelay)
}
slideit()

//-->
</script>

twQ
01-14-2010, 08:36 PM
It's not actually doing anything at the moment when you click, so you could use this for your img tag instead of what you have now.



<img src="homepage425x240a.jpg" alt="CUPE 4000" name="slide" border=0 style="filter:blendTrans(duration=1)" width=425 height=240 style="cursor: default;">

The red is all you need to add.

Then they won't see the hand. Is that what you're looking for?

HSRyan
01-14-2010, 09:00 PM
Thanks, but that didn't seem to change anything:

http://ryancreative.com/cupe4000/index1.html

twQ
01-14-2010, 09:33 PM
I apologize, try adding it to <a> element as such.



<a href="javascript:gotoshow()" style="cursor: default;">


That should work.

jscheuer1
01-15-2010, 02:59 PM
To avoid a javascript error, you should also change this:


function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}


to:


function gotoshow(){

}

HSRyan
01-16-2010, 06:30 PM
Thanks guys!

Doing both things solved the problem.

You just made my day!

Steve