View Full Version : Linking slideshow pics to new window
adprende
09-16-2005, 05:32 PM
Looking to have the target site open up in a new window using the slideshow, any help please?
jscheuer1
09-16-2005, 07:07 PM
whatever
.
adprende
09-16-2005, 07:10 PM
<script language="JavaScript1.2">
/***********************************************
* Flexi Slideshow- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var variableslide=new Array()
//variableslide[x]=["path to image", "OPTIONAL link for image" TARGET="_blank", "OPTIONAL text description (supports HTML tags)"]
variableslide[0]=['images/homecoming_golf_tournament.jpg', 'http://store.appcomm.net/Merchant2/merchant.mv?Screen=PROD&Store_Code=cusports&Product_Code=HGT&Category_Code=HGT', '']
variableslide[1]=['images/Microtel_Ad.jpg', 'http://www.microtelinn.com', '']
variableslide[2]=['images/pep_band.jpg', '', '']
variableslide[3]=['images/sponsor_ads/3dollaroffbanner.jpg', 'http://www.gocamels.com/Sam_Goody_Coupon.htm', '']
variableslide[4]=['images/store_banner.jpg', 'http://store.appcomm.net/Merchant2/merchant.mv?Screen=SFNT&Store_Code=cusports', '']
variableslide[5]=['images/Hiester_Banner_Ad.jpg', 'http://www.hiesterautomotive.com', '']
//configure the below 3 variables to set the dimension/background color of the slideshow
var slidewidth='600px' //set to width of LARGEST image in your slideshow
var slideheight='75px' //set to height of LARGEST iamge in your slideshow, plus any text description
var slidebgcolor='#FFFFFF'
//configure the below variable to determine the delay between image rotations (in miliseconds)
var slidedelay=5000
////Do not edit pass this line////////////////
var ie=document.all
var dom=document.getElementById
for (i=0;i<variableslide.length;i++){
var cacheimage=new Image()
cacheimage.src=variableslide[i][0]
}
var currentslide=0
function rotateimages(){
contentcontainer='<center>'
if (variableslide[currentslide][1]!="")
contentcontainer+='<a href="'+variableslide[currentslide][1]+'">'
contentcontainer+='<img src="'+variableslide[currentslide][0]+'" border="0" vspace="3">'
if (variableslide[currentslide][1]!="")
contentcontainer+='</a>'
contentcontainer+='</center>'
if (variableslide[currentslide][2]!="")
contentcontainer+=variableslide[currentslide][2]
if (document.layers){
crossrotateobj.document.write(contentcontainer)
crossrotateobj.document.close()
}
else if (ie||dom)
crossrotateobj.innerHTML=contentcontainer
if (currentslide==variableslide.length-1) currentslide=0
else currentslide++
setTimeout("rotateimages()",slidedelay)
}
if (ie||dom)
document.write('<div id="slidedom" style="width:'+slidewidth+';height:'+slideheight+'; background-color:'+slidebgcolor+'"></div>')
function start_slider(){
crossrotateobj=dom? document.getElementById("slidedom") : ie? document.all.slidedom : document.slidensmain.document.slidenssub
if (document.layers)
document.slidensmain.visibility="show"
rotateimages()
}
if (ie||dom)
start_slider()
else if (document.layers)
window.onload=start_slider
</script>
sorry
www.gocamels.com
johnb
10-31-2005, 03:47 AM
for anyone else looking for this answer ...
search for and change this line
contentcontainer+='<a href="'+variableslide[currentslide][1]+'">'
to this
contentcontainer+='<a href="'+variableslide[currentslide][1]+'"target="_blank">'
kind regards, John
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.