Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Old 12-08-2006, 11:45 PM slide show help
Junior Talker

Posts: 3
Name: Karl Sturdivant II
Trades: 0
Can anyone tell me why this script won't work?




<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Portfolio Page</title>

<script type="text/Javascript">

// JavaScript Document
var samples= new Array(6);
var photoslink= new Array(6);
var clients= new Array(6);
var descriptions= new Array(6);
var whichone=0;

//define images next
samples[0]='../Images/picture1.jpg';
samples[1]='../Images/picture2.jpg';
samples[2]='../Images/picture3.jpg';
samples[3]='../Images/picture4.jpg';
samples[4]='../Images/picture5.jpg';
samples[5]='../Images/picture6.jpg';

//Define whether or not the photos will be linked. (1=linked)
var linkornot= 0

//Place corresponding URL's for photos here.
sampleslink[0]=""
sampleslink[1]=""
sampleslink[2]=""
sampleslink[3]=""
sampleslink[4]=""
sampleslink[5]=""

//Define client info.
clients[0]=new String('<span class="primarynavbar_text">Lady puttin on makeup.</span>')
clients[1]=""
clients[2]=""
clients[3]=""
clients[4]=""
clients[5]=""

//Define client descriptions.
descriptions[0]=""
descriptions[1]=""
descriptions[2]=""
descriptions[3]=""
descriptions[4]=""
descriptions[5]=""


var preloadedsamples=new Array()
var prelaodedclients=new Array()
var preloadeddescriptions=new Array()
for (i=0;i<samples.length;i++){
preloadedsamples[i]=new Image()
preloadedsamples[i].src=samples[i]
preloadedclients[i]=new substring()
preloadedclients[i].src=clients[i].src
preloadeddescriptions[i]=new substring()
preloadeddescriptions[i].src=descriptions[i].src
}


function applyeffect(){
if (document.all && photoslider.filters){
photoslider.filters.revealTrans.Transition=Math.fl oor(Math.random()*23)
photoslider.filters.revealTrans.stop()
photoslider.filters.revealTrans.apply()
}
}


function playeffect(){
if (document.all && photoslider.filters){
photoslider.filters.revealTrans.play()
}
}


function keeptrack(){
window.status="Image "+(whichone+1)+" of "+samples.length
}


function previous(){
if (whichone>0){
which--
applyeffect()
document.images.photoslider.src=samples[whichone]
playeffect();
keeptrack()
}
}


function next(){
if (whichone<samples.length){
which++
applyeffect()
document.images.photoslider.src=samples[whichone]
document.write(clients[whichone].String(clients[whichone])
document.write(descriptions[whichone.String(descriptions[whichone]
playeffect()
keeptrack()
}
}


function transport(){
window.location=photoslink[whichone]
}



</head>
</script>

<body>





















<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" colspan="2" height="22">
<div align="center">
<script>
if (linkornot==1)
document.write('<a href="Javascript:transport()"><img src="'+samples[0]+'" name="photoslider" style="filter:revealTrans(duration=2,transition=23 )" border=0></a>')
else {
document.write('<a href="Javascript:transport()"><img src="'+samples[whichone]+'" name="photoslider" style="filter:revealTrans(duration=2,transition=23 )" border=0></a>')
</script>
</div>
</td>
</tr>
<tr>
<td width="50%" height="21"><p align="left"><a href="#" onClick="retreat();return false">Retreat</a></p></td>
<td width="50%" height="21"><p align="left"><a href="#" onClick="retreat();return false">Advance</a></p></td>
</tr>
</table>
</body>
</html>
kyzuki is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Reply     « Reply to slide show help
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.26773 seconds with 12 queries