Go Back   SitePoint Forums > Forum Index > Program Your Site > JavaScript
Newsletter FAQ Members List Calendar Mark Forums Read

New to SitePoint Forums? Register here for free!

SitePoint Sponsor
 
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old Jul 9, 2006, 13:51   #1
gloryboy
SitePoint Zealot
 
Join Date: Jan 2006
Location: south london
Posts: 181
newbie code help needed

can anyone help me out here

im having abit of javascript trouble, this is my first javascript experience, i have tried this code lots of different ways round and cant get it to work, can anyone give me the correct sequences.

<td align="center" width="50%">
<img border="1" src="kingsimports_images/wooden-dock.jpg" width="200" height="200" id="Makayo Lodge"><br />

<a href="#_self" onclick="NextImageSlide('Makayo Lodge','kingsimports_images/caribbean-beach1.jpg;kingsimports_images/veranda.jpg;kingsimports_images/kitchen-window.jpg;kingsimports_images/beach1.jpg')">
click here to see the next picture</a>

<script language="javascript">


// Manual Slide-Show script. With image cross fade effect for those browsers
// that support it.
var manualPictures = new Array();
function NextImageSlide(pictureName,imageFiles)
{
// Ensure picture list primed.
if (manualPictures[kingsimports_images/wooden-dock.jpg] == null) {
manualPictures[wooden-dock.jpg] = imageFiles;
} else {
imageFiles = manualPictures[wooden-dock.jpg];
}
var imageSeparator = imageFiles.indexOf(";");
var nextImage = imageFiles.substring(0,imageSeparator);
if (document.all)
{
document.getElementById(wooden-dock.jpg).style.filter="blendTrans(duration=2)";
document.getElementById(wooden-dock.jpg).filters.blendTrans.Apply();
}
document.getElementById(dock.jpg).src = nextImage;
if (document.all)
{
document.getElementById(wooden-dock.jpg).filters.blendTrans.Play();
}
manualPictures[wooden-dock.jpg] =
imageFiles.substring(imageSeparator+1,imageFiles.length)
+ ';' + nextImage;
}

</script><br />

</td>

i want alot of image slideshows on 1 page, do i need to repeat the code each time for each slideshow?

cheers

Last edited by gloryboy; Jul 11, 2006 at 00:57.
gloryboy is offline   Reply With Quote
 

Bookmarks

« Previous Thread | Next Thread »

Thread Tools
Display Modes

 
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
Sponsored Links
 
Forum Jump


All times are GMT -7. The time now is 01:31.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Copyright 1998-2009, SitePoint Pty Ltd. All Rights Reserved