R
Rabel
Hi I am new to javascript and I am using a code that brings up
pictures(slideshow) with this code
<script type="text/javascript">
var photos=new Array()
var which=0
photos[0]="../images/fullfc_pe_04.jpg"
photos[1]="../images/fullfc_pe_05.jpg"
photos[2]="../images/fullfc_pe_06.jpg"
photos[3]="../images/fullfc_pe_07.jpg"
photos[4]="../images/fullfc_pe_08.jpg"
photos[5]="../images/fullfc_pe_09.jpg"
photos[6]="../images/fullfc_pe_12.jpg"
var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages=new Image()
preloadedimages.src=photos
}
function applyeffect(){
if (document.all && photoslider.filters){
photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23)
photoslider.filters.revealTrans.stop()
}
}
function playeffect(){
if (document.all && photoslider.filters)
photoslider.filters.revealTrans.play()
}
function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}
function backward(){
if (which>0){
which--
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}
function forward(){
if (which<photos.length-1){
which++
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}
function transport(){
window.location=photoslink[which]
}
</script>
then using this
<script>
if (linkornot==1)
document.write('<a href="javascript:transport()">')
document.write('<img src="'+photos[0]+'" name="photoslider"
style="filter:revealTrans(duration=2,transition=23)" border=0>')
if (linkornot==1)
document.write('</a>')
</script>
I got that code from a co-worker who got it at a free code site and I
know some of it isnt used. The question I have is can I tell a link
from a another page which picture I want it to load, if so how would I
go about that, thanks in advance.
pictures(slideshow) with this code
<script type="text/javascript">
var photos=new Array()
var which=0
photos[0]="../images/fullfc_pe_04.jpg"
photos[1]="../images/fullfc_pe_05.jpg"
photos[2]="../images/fullfc_pe_06.jpg"
photos[3]="../images/fullfc_pe_07.jpg"
photos[4]="../images/fullfc_pe_08.jpg"
photos[5]="../images/fullfc_pe_09.jpg"
photos[6]="../images/fullfc_pe_12.jpg"
var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages=new Image()
preloadedimages.src=photos
}
function applyeffect(){
if (document.all && photoslider.filters){
photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23)
photoslider.filters.revealTrans.stop()
}
}
function playeffect(){
if (document.all && photoslider.filters)
photoslider.filters.revealTrans.play()
}
function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}
function backward(){
if (which>0){
which--
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}
function forward(){
if (which<photos.length-1){
which++
applyeffect()
document.images.photoslider.src=photos[which]
playeffect()
keeptrack()
}
}
function transport(){
window.location=photoslink[which]
}
</script>
then using this
<script>
if (linkornot==1)
document.write('<a href="javascript:transport()">')
document.write('<img src="'+photos[0]+'" name="photoslider"
style="filter:revealTrans(duration=2,transition=23)" border=0>')
if (linkornot==1)
document.write('</a>')
</script>
I got that code from a co-worker who got it at a free code site and I
know some of it isnt used. The question I have is can I tell a link
from a another page which picture I want it to load, if so how would I
go about that, thanks in advance.