Click to See Complete Forum and Search --> : Want to add a third function to slide show


Lucien15
05-05-2006, 05:41 AM
I would like to add a third function to slide show so that I can open html files in the leftFrame simultaneously with the "leftrightside" files.

Presently I can only send the "leftrightside" href's to the mainFrame and thumb images to the bottomFrame (where the javascript code is).


For example:
leftrightslide[0]='<a href="images/AthleticTraining.jpg" target="mainFrame"><img src="images/AthleticTrainingThumb.jpg" border=5></a>'

To the above I want to add:

<a href="bhakti-yoga.com" target="leftFrame">

and down the array from[0] to [5]

***************************************

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<HTML>
<HEAD>
<TITLE>Conveyor Belt Save</TITLE>
</HEAD>

<BODY>

<script type="text/javascript">

/***********************************************
* Conveyor belt slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
//Specify the slider's width (in pixels)
var sliderwidth="800px"
//Specify the slider's height
var sliderheight="170px"
//Specify the slider's slide speed (larger is faster 1-10)
var slidespeed=1
//configure background color:
slidebgcolr="url('images/tan_paper.gif')"


//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[1]='<a href="ButtonAlert.htm" target="mainFrame"><img src="images/PaelestraThumb.jpg" border=5></a>'
leftrightslide[2]='<a href="images/KingLeonidas5.jpg" target="mainFrame"><img src="images/KingLeonidasThumb.jpg" border=5></a>'
leftrightslide[3]='<a href="images/StatueOfLeonidasAtThermopylae.jpg" target="mainFrame"><img src="images/StatueOfLeonidasAtThermopylaeThumb.jpg" border=5></a>'
leftrightslide[4]='<a href="images/SpartanHoplite.jpg" target="mainFrame"><img src="images/SpartanHopliteThumb.jpg" border=5></a>'
leftrightslide[5]='<a href="images/SpartanHoplite2.jpg" target="mainFrame"><img src="images/SpartanHoplite2Thumb.jpg" border=5></a>'


//Specify gap between each image (use HTML):
var imagegap="&nbsp;&nbsp;&nbsp;"

//Specify pixels gap between each slideshow rotation (use integer):
var slideshowgap=50


////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=slidespeed
leftrightslide='<nobr>'+leftrightslide.join(imagegap)+'</nobr>'

document.write('<span id="temp" style="visibility:hidden;position:absolute;top:-100px;left:-9000px;">'+leftrightslide+'</span>')
var actualwidth=''
var cross_slide, ns_slide


function fillup(){

cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3

cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
cross_slide2.style.left=actualwidth+slideshowgap+"px"

lefttime=setInterval("slideleft()",30)
}
window.onload=fillup


function slideleft(){

if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
else
cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"

if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
else
cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"


}



with (document){
document.write('<table border="10" cellspacing="5" cellpadding="5" bordercolor="orange"><td style="background-image:url(images/red_rock.gif)">')

write('<div style="position:relative;width:'+sliderwidth+';height:'+sliderheight+';overflow:hidden">')
write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-image:'+slidebgcolr+' " onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
write('<div id="test2" style="position:absolute;left:0px;top:5px;border:double thick yellow"></div>')
write('<div id="test3" style="position:absolute;left:-1000px;top:5px;border:double thick green"></div>')

document.write('</td></table>')

}


</script>


<script language="JavaScript" type="text/javascript">
//document.write('<p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br>
//<a href="http://dynamicdrive.com">Dynamic Drive</a></font></p>');

</script>




</BODY>
</HTML>

phpnovice
05-05-2006, 06:44 PM
leftrightslide[0]='<a href="images/AthleticTraining.jpg" target="mainFrame" onclick="top.frames['leftFrame'].href = 'bhakti-yoga.com'; return true;"><img src="images/AthleticTrainingThumb.jpg" border=5></a>'