Hi all,

 I am trying to create a page that reads a directory of images and
displays them with scriptaculous. So far from what I have, the code
does work as far as displaying the directory links but it is only
making the very 1st one active, all the rest of the directory links on
the page work, BUT they are expanding and folding only the first
directory (gemstone).

I hope this was a good explanation. I've posted my code to help make
it as clear as I can.

Here is my code:

<?php
echo "<div id = noWrap>";
echo '<div id = img_cursor>';


$directories = array('gemstone', 'bella', 'passage', 'sedona',
'deepstar', 'crystalline');

foreach ($directories as $directory){

$mydir2=opendir("images/laminate/Wilsonart_Laminate_Colors/
$directory");

$cats2=array();

echo "<h2><a href=\"#\" onclick=\"Effect.toggle('d2','BLIND',
{duration: 2.0}); return false;\">$directory</h2><br /></a>";


while(($cat2=readdir($mydir2)) !==false){


if ($cat2 != "." && $cat2 != ".." && strpos(strtolower($cat2),"-
thumb.jpg") !== false){
array_push($cats2, $cat2);

echo "<div id=\"d2\" style=\"display:none;\">";



echo "<img src='images/laminate/Wilsonart_Laminate_Colors/$directory/
$cat2' onclick='Another_Big_One(this)'></div>";

}



}

closedir($mydir2);

}
echo "</div>";
echo "</div>";

?>

Blessings
David M.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to