-
php array and ultimate fadein slideshow
1) Script Title: Ultimate Fadein Slideshow
2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm
3) Describe problem: Cannot get array and script to talk to one another
I have studied the thread in http://www.dynamicdrive.com/forums/a...p/t-10016.html
but no matter what I do I cannot get the combined scripts to work.
The php array works ok on testing separately.
I have tried all ways to get the script to work. Incorporate the php array into DD script, preload, all sorts but the two scripts don't talk to one another.
Following scripts are in the head:
<script type="text/javascript" src="./includes/getphotos2.php?preload"></script>
<script type="text/javascript" src="./includes/fadeslides.js"></script>
The php will be familiar,
<?php
// gethotos.php
$directory = "./../pics";
header("Content-Type: text/javascript");
$dir = opendir($directory);
for($i=0;$file = readdir($dir);$i++)
if(strpos($file, ".") === 0) {
$i--;
continue;
} else if(isset($_GET['preload'])) {
echo("(new Image()).src = '$directory/$file';\n");
} else echo("fadeimages[$i]=['$directory/$file', '', ''];\n");
?>
Obviously, I also have the javascript for fadeshow in the html.
However, I get error that fadeshow is not defined.
What have I done wrong?
Cheers
Ian
-
-
-
-
Thank you,
This has been a long and tortuous journey.
I have put both scripts in off page includes and works a treat.
See http://www.venachar-lochside.co.uk/photos.html
Ian
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks