Dynamic image gallery on detail page

I have a master page listing 8 products. I have inserted a dynamic image gallery on the detail page which looks ok, but has one major flaw: when you click on a thumbnail the main image opens on the wrong page. e.g. if you click on page ../dragons.php?id=3 the main image opens on  ../dragons.php/id=1 and shows the following url: .../dragons.php?image=btf.jpg (or whatever the image file name).
I have only just started using php and I would appreciate some guidance on how to resolve this problem.
The relevant sections of the code are as follows?
$vardragon_dragons_species = "1";
if (isset($_GET['id'])) {
  $vardragon_dragons_species = $_GET['id'];
mysql_select_db($database_cjwebsite, $cjwebsite);
$query_dragons_species = sprintf("SELECT dragons.Order, dragons.family, dragons.Latin, dragons.English, dragons.Img1, dragons.Img2, dragons.Img3, dragons.img4, dragons.Img5, dragons.text, `dragons gallery`.filename, `dragons gallery`.caption, dragons.id, `dragons gallery`.image_id, dragons.id FROM dragons, `dragons gallery` WHERE dragons.id = `dragons gallery`.image_id AND dragons.id=%s", GetSQLValueString($vardragon_dragons_species, "int"));
$dragons_species = mysql_query($query_dragons_species, $cjwebsite) or die(mysql_error());
$row_dragons_species = mysql_fetch_assoc($dragons_species);
$totalRows_dragons_species = mysql_num_rows($dragons_species);
if (isset($_GET['image'])) {
  $mainImage = $_GET['image'];
else {
  $mainImage = $row_dragons_species['filename']; }
<body>
  <div class="main_image"><img src="../images/dragons/<?php echo $mainImage; ?>" alt="<?php echo $row_dragons_species['caption']; ?>" />
  <div class="capt"><?php echo $row_dragons_species['caption']; ?></div>
<ul class="gallery">
        <?php do {
      if ($row_dragons_species['filename'] == $mainImage) {
                 $row_dragons_species['caption'];
               }?>
  <li><a href="<?php echo $_SERVER['PHP_SELF'];?>?image=<?php echo $row_dragons_species['filename']; ?>"><img src="../images/dragons/thumbs/<?php echo $row_dragons_species['filename']; ?>" alt="<?php echo $row_dragons_species['caption']; ?>"  /></a></li>
  <?php } while ($row_dragons_species = mysql_fetch_assoc($dragons_species)); ?>
  </ul>
Many thanks
CJ 

I'm still at an early stage in building this site and because it is allvery experimental I am and just using local testing.
So to try to explain my objective. I have a master page with 8 products  there is a link to a detail page based on product id. So from the master page (dragons.php) you can select a product which will show the product information on a detail page (eg. dragons_species.php?id=1 or dragons_species.php?id=2 etc). This works ok.
Each detail page has various pieces of information and 5 images. I wanted to show the images in an image gallery format and so used the code you provide in your book PHP Solutions (Creating a Dynamic Online Gallery pp.323-330). This works ok on the first page where id=1, but on subsequent pages (id=2, id=3 etc) I am loosing the id link infavour of an image based link.
This is the complete script for my detail page (dragons_species.php)
<?php require_once('../Connections/cjwebsite.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;   
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  return $theValue;
$vardragon_dragons_species = "1";
if (isset($_GET['id'])) {
  $vardragon_dragons_species = $_GET['id'];
mysql_select_db($database_cjwebsite, $cjwebsite);
$query_dragons_species = sprintf("SELECT dragons.Order, dragons.family, dragons.Latin, dragons.English, dragons.Img1, dragons.Img2, dragons.Img3, dragons.img4, dragons.Img5, dragons.text, `dragons gallery`.filename, `dragons gallery`.caption, dragons.id, `dragons gallery`.image_id, dragons.id FROM dragons, `dragons gallery` WHERE dragons.id = `dragons gallery`.image_id AND dragons.id=%s", GetSQLValueString($vardragon_dragons_species, "int"));
$dragons_species = mysql_query($query_dragons_species, $cjwebsite) or die(mysql_error());
$row_dragons_species = mysql_fetch_assoc($dragons_species);
$totalRows_dragons_species = mysql_num_rows($dragons_species);
if (isset($_GET['image'])) {
  $mainImage = $_GET['image'];
else {
  $mainImage = $row_dragons_species['filename']; }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Odonata Species</title>
<link href="../Css/dragons.css" rel="stylesheet" type="text/css" />
<link href="../Css/menu.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
  <?php include('../Includes/logo2.inc.php'); ?>
</div>
<div id="content"> <div id="title">
  <h1>Damselflies &amp; Dragonflies</h1>
</div>
<div class="family")><?php echo $row_dragons_species['Order']; ?></div>
<div class="subfamily">
  <?php echo $row_dragons_species['family']; ?>
  <div class="main_image"><img src="../images/dragons/<?php echo $mainImage; ?>"   alt="<?php echo $row_dragons_species['caption']; ?>" />
   <div class="capt"><?php echo $row_dragons_species['caption']; ?></div></div></  
   <div class="description">
    <div class="text" id="name"><?php echo $row_dragons_species['Latin']; ?></div>
    <div  id="vernname"><?php echo $row_dragons_species['English']; ?></div>
  <?php echo $row_dragons_species['text']; ?></div>
<ul class="gallery">
        <?php do {
                  if ($row_dragons_species['filename'] == $mainImage) {
                 $row_dragons_species['caption'];
               }?>
<li><a href="<?php echo $_SERVER['PHP_SELF'];?>?image=<?php echo $row_dragons_species['filename']; ?>"><img src="../images/dragons/thumbs/<?php echo $row_dragons_species['filename']; ?>" alt="<?php echo $row_dragons_species['caption']; ?>"  /></a></li>
  <?php } while ($row_dragons_species = mysql_fetch_assoc($dragons_species)); ?>
  </ul>
  <div id="footer">
    <?php include('../includes/footer.inc.php'); ?>
</div></div>
</div>
</body>
</html>
<?php
mysql_free_result($dragons_species);
?>
The code for my master page dragons.php is as follows
<?php require_once('../Connections/cjwebsite.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;   
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  return $theValue;
mysql_select_db($database_cjwebsite, $cjwebsite);
$query_dragons_species = "SELECT id, Latin, English, Thumbs FROM dragons";
$dragons_species = mysql_query($query_dragons_species, $cjwebsite) or die(mysql_error());
$row_dragons_species = mysql_fetch_assoc($dragons_species);
$totalRows_dragons_species = mysql_num_rows($dragons_species);mysql_select_db($database_cjwebsite, $cjwebsite);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Odonata</title>
<link href="../Css/menu.css" rel="stylesheet" type="text/css" />
<link href="../Css/dragons.css" rel="stylesheet" type="text/css" />
<body>
<div id="header">
<?php include('../Includes/logo2.inc.php'); ?></div>
<div id="content"> <div id="title">
<h1>Damselflies</a> & Dragonflies</h1>
<div id="sidebar">
<?php include('../Includes/menu2.inc.php'); ?>
<div id="text">
<h2>ODONATA</h2>
    </h2>
  <p>Ten species have been recorded on the islands, of which seven are common and widely distributed. The Golden-ringed Dragonfly and the Emerald Damselfly are both very scarce, whilst the record of the Azure-winged Dragonfly on Lewis is unconfirmed.   
       <?php do { ?>
    <div class="speciesbox"><a href="Dragons_species.php?id=<?php echo $row_dragons_species['id']; ?>"><img src="../images/dragons/thumbs/<?php echo $row_dragons_species['Thumbs']; ?>" /></a>
        <div class="latin"><a href="Dragons_species.php?id=<?php echo $row_dragons_species['id']; ?>"><?php echo $row_dragons_species['Latin']; ?></a>
          <div class="english"><a href="Dragons_species.php?id=<?php echo $row_dragons_species['id']; ?>"><?php echo $row_dragons_species['English']; ?></a> </div>
    </div></div>
  <?php } while ($row_dragons_species = mysql_fetch_assoc($dragons_species)); ?> </div>
<div id="footer">
    <?php include('../includes/footer.inc.php'); ?>
</div>
</body>
</html>
<?php
mysql_free_result($dragons_species);
?>
Does this shed any light?
Many thanks
CJ.

Similar Messages

  • Dynamic Image Gallery Issue

    Hello All!
    I am creating a dynamic image gallery, but when my external
    images load in the empty movie clip, all the images are loading in
    the same size/dimension. Does anyone know how I can command the MC
    to load the images in different sizes, another words - to load them
    according to its own size?
    here's the AS
    onClipEvent (load)
    function imageMove()
    var _loc1 = this;
    for (i = 1; i <= num_of_image; i++)
    mc = _loc1["image" + i];
    if (i < hit)
    tempx = small * (i - 1) + 30;
    temps = small - 5;
    mc.useHandCursor = true;
    else if (i > hit)
    tempx = big + small * (i - 2) + 30;
    temps = small - 5;
    mc.useHandCursor = true;
    else
    tempx = small * (i - 1) + 150; //distance of how far out the
    displayed image jumps.
    temps = big - 5; //distance between the displayed image and
    thumbnails.
    mc.swapDepths(1000);
    display = txt
    mc.useHandCursor = false;
    } // end else if
    mc._x = mc._x + (tempx - mc._x) / 3; //number of pixals on
    x-axis the displayed image moves over to right side before growing
    big.
    mc._width = mc._width + (temps - mc._width) / 3; //number of
    pixals on x-axis the displayed image moves over to left side before
    growing big.
    mc._height = mc._width * 4 / 3;
    if (Math.abs(mc._width - temps) <= 1)
    title._x = hit < 5 ? (_loc1["image" + hit]._x + big / 2) :
    (_loc1["image" + hit]._x - big / 2 - 100);
    title._y = 100;
    } // end if
    } // end of for
    } // End of the function
    function loopHye()
    if (hit != num_of_image)
    ++_global.hit;
    else
    _global.hit = 1;
    } // end else if
    } // End of the function
    getURL("FSCommand:allowscale", false);
    big = 300;
    //Large image width (400 works best for my portfolio site)
    small = 60;//Small image width (40 works well for my
    portfolio site)
    num_of_image = 8;//Total number of images
    timeGap = none;//Speed (speed of gaptime when each image is
    displayed automatically. "2000" is default of this original file.
    larger the number the slower the image changes. (type in "none"
    will stop automatic images from changing.
    _global.hit = 0;//First displyed image number (type "0" to
    stop images from growing out)
    txt = [" ", "image1", "image2", "image3", "image4", "image5",
    "image6", "image7", "image8"];//insert text of each images between
    for (i = 1; i <= num_of_image; i++)
    attachMovie("image", "image" + i, i);
    loadMovie("image/" + i + ".jpg", this["image" +
    i].tar);//image folder path
    mc = this["image" + i];
    mc._x = small * (i - 1) + 30;
    mc._y = 200; //where on the axis should the displays be.
    mc._width = small - 5;
    mc._height = mc._width * 4 / 3;
    this["image" + i].onRelease = function ()
    clearInterval(interval);
    _global.hit = this._name.substr(5);
    interval = setInterval(loopHye, timeGap);
    } // end of for
    interval = setInterval(loopHye, timeGap);
    onClipEvent (enterFrame)
    imageMove();
    check out the file
    http://www.wendiland.com/Gallery122b.fla
    this is what the current gallery looks like
    http://www.wendiland.com/print2.html
    I'd appreciated if someone replies with any sort of
    suggestions! thanks in advance!!!
    - W£NDI

    if you google with "dynamic image gallery", you'll find a lot
    of
    tutorials & examples including pre-programmed solutions
    if you prefer to do it yourself, you need to deal with
    dynamic sites. DW
    help chapters Preparing to Build Dynamic Sites, Making Pages
    Dynamic &
    Developing Applications Rapidly can also help to understand
    in fact you don't need a database, the images can be read
    from the
    folder they're stored. that way to update a gallery you only
    need to
    remove/replace/add images. one folder for each gallery
    and the application development forum is best suited for your
    question
    BTW, some nice photos in your page
    hth,
    jdoe
    uvi wrote:
    > I'm trying to create a dynamic image gallery that is
    updated from a database, i
    > managed to create a simple mysql database
    > using phpmy admin, so I could update my image gallery
    more often, I saw
    > something that I like but I have no idea how to create
    it here is the example:
    >
    http://flight001.com/store/trip.htm?itemid=307&sid=201&page=2
    > I didnt manage to create this with dynamic table from
    within dreamweaver 8,
    > maybe I just don't know how,
    > this is the link to a gallery on my website:
    >
    http://www.yuvallavy.com/work/scenic/scenic.htm.
    I need all the help I can get
    > I'm using dreamweaver 8 on a Mac and using PHP/MySql
    server model.
    >

  • Dynamic Image Gallery AS2

    I have dipped in almost every search engine and this site to
    locate some easier way to create dynamic image gallery in Flash 8
    AS2 using ASP (as i am conversant with ASP only, although i found
    many sites suggesting PHP and XML). I'd be very greatful to u all
    if u could provide me some help in this part of my project.
    I have tried this source also but neither the source throw
    any error nor it displays the images, what could be wrong with the
    source? Please Please Please Please Please Help me!!!!!!!!
    this.createClassObject(mx.containers.ScrollPane,
    "scroller_sp", 10);
    scroller_sp. setSize (100, 300);
    swfThumbs=["imgs/img1.jpg","imgs/img2.jpg","imgs/img3.jpg"]
    this.createEmptyMovieClip("clipLoader",1);
    for(i=0;i< swfThumbs.length;i++){
    clipLoader.createEmptyMovieClip("clip"+i+"_mc",i)
    clipLoader.attachMovie("clip"+i+"_mc","clip"+i+"_mc",i+10);
    clipLoader.loadMovieNum(swfThumbs
    ,i+100);
    scroller_sp.contentPath = clipLoader;
    thanks in anticipation and regards
    raajaindra

    Hi,
    I have a picture show.
    It creates its own folder when you first upload images with
    the integrated Image uploader. Then it loads the images in with
    ASP.
    Have a look at
    http://netwings.info
    - click the B1 Image-show.
    When you are interested, the contact is at the site.
    Regards,
    Luciewong

  • Dynamic image gallery

    Hi all, I am new to the forum and I have a specific question
    about a dynamic image gallery i am making.
    Everything goes well, until I want to click from a thuimbnail
    to see an enlarged image that is another file.
    here is the specific code for that:
    1) one problem is that -when I wlick one of the 5 jpegs
    attached- I always see the last one enlarged...
    2) another problem is to go back to the thumbs after clicking
    the enlarged image...
    PLease help me

    One issue it might be, is that in your for loop you have var
    i:Number=1; Set to 1 not 0. Then you referrence that number when
    declaring your small and large images by i.
    Remember actionscript always starts at zero not 1 when
    creating objects dynamically.

  • Dynamic Image Gallery First, Next,Previous,Last

    had a friend help me build this but now he's gone and I don't
    understand arrays or coldfusion really. I have an image gallery
    that works beautifully except that I want to be able to add two
    behaviors to the page. 1.Pagination. 2. Display Record Count. (I
    know how to use the Dreamweaver built in Server Behaviors with
    Dynamic Tables but this is a little different from that b/c he's
    using arrays to build the table instead. I've almost go the
    pagination working. Except I can't figure how to show the last
    record. I've got "First, Next, & Previous" to work. But the
    "Last" doesn't. This is the part of the code that I'm concerned
    with as everything else is working.
    <cfset CountUp=Count + 10>
    <cfset CountDown=Count - 10>
    <p align="center"><cfif Count gte 1><a
    href="gallery.cfm">First</a></cfif>  <cfif
    Count gte 10><a
    href="gallery.cfm?Count=<cfoutput>#CountDown#</cfoutput>">Previous</a></cfif>  <cfif
    ArrayLen(PhotoArray) gt CountUp><a
    href="gallery.cfm?Count=<cfoutput>#CountUp#</cfoutput>">Next</a></cfif><cfif
    ArrayLen(PhotoArray) lt CountUp><a
    href="gallery.cfm?Count=<cfoutput>#CountUp#</cfoutput>">Last</a></cfif>
    I have no idea how to write the "Display record counts" so if
    someone can help me write that part I would be so greatful.
    Here is all of the code for this page attatched...
    Attach Code

    Your code is more complicated than it needs to be. I honestly
    didn't dig through it, but here are a few suggestions.
    Use ArrayLen(array[]) to count the number of rows in an aray.
    Use array[ArrayLen(array)] to find the last record

  • Dynamic Image rendering on JSP page

    Hi All!
    I want to display images on my JSP page. However, the images should be generated dynamically (As are used by many sites during the registration process e.g., yahoo, etc..) How can i achieve this?
    plz help! Its urgent!

    Yes, but your in the wrong forum for this.
    Use the search bar to look for posts and have a look in
    http://forum.java.sun.com/forum.jspa?forumID=5
    There are forums on Multimedia which may also have some information.

  • Adding "loading" movieclip to dynamic image gallery?

    Hello again,
    I've completed my XML-driven image gallery, however upon live testing I'd realized I made a rookie mistake and not put some kind of placeholder "loading" movie clip loop while the thumbnails—and subsequent full-size images—are being loaded. The images will randomly appear when loaded and I would like to be able to insert a placeholder movie clip while they load, and swap them up with the thumbnails/images after it has been loaded. The placeholder movie clip is in my library (loadingLoop), but I'm having problems getting it to work correctly.
    Below is the original function that processes the XML and adds the thumbnail images; this is where I'm trying to insert the placeholder movie clip per XML child node (every attempt I've made just keeps throwing more errors, so I've omitted my attempts to avoid confusion), and I've attached the XML file for testing. And insight or help would be appreciated.
    //Locate the external XML file and trigger xmlLoaded when complete
    xmlLoader.load(new URLRequest("data/artGallery.xml"));
    xmlLoader.addEventListener(Event.COMPLETE, xmlLoaded);
    //Load the XML and process the image locations
    function xmlLoaded(event:Event):void {
        xml = XML(event.target.data);
        //parse the nodes in the XML file
        xmlList = xml.children();
        //count the number of nodes in the XML file via XMLList
        trace(xmlList.length());
        //loop to load all of the thumbnails, based on the number of nodes in XMLList
        //"i" = every child node in the XML file
        for (var i:int = 0; i < xmlList.length(); i++) {
            //Add loadingLoop movie clip per node and wait for thumnail to load before swapping out with imageLoader thumbnail images <-- help!!
            //for every node, create a new instance to be put on stage
            imageLoader = new Loader();
            //load each thumbnail from its location per XML node's "thumb" attribute
            imageLoader.load(new URLRequest(xmlList[i].attribute("thumb")));
            //position of thumbnail instances per XML node (horizontally across stage)
            imageLoader.x = i * 110 + 10;//thumbs are 100 x 100 so, +10 to the width, plus +10 from left edge
            //imageLoader.y = 10;
            //for each node in XML list, name the instance with the path to the location of the full size image
            imageLoader.name = xmlList[i].attribute("source");
            //for each node in the XML list, add a drop shadow
            imageLoader.filters = [thumbDShadow];
            //add thumbnails to stage
            addChild(imageLoader);
            dropTween = new Tween(imageLoader, "y", Bounce.easeOut, -100, 10, 1, true);
            //set up thumbnails to wait for a click to execute showPicture
            imageLoader.addEventListener(MouseEvent.CLICK, showPicture);
            //set up thumbnails to scale when rolled over
            imageLoader.addEventListener(MouseEvent.ROLL_OVER, sizeUP);

    Somehow I had a feeling this wouldn't be a copy-and-paste job for the full-size images. Sorry to be a bother. This is the showPicture function that is fired off when the thumbnail image is clicked (from our previous example). Two errors are thrown:
    When the thumnail is clicked:
    "Error #2007: Parameter child must be non-null.
        at flash.display::DisplayObjectContainer/removeChild()
        at MethodInfo-51()"
    But the full-size image loads nonetheless. The second loading loop (loadingLoop2) is not removed. Below is the showPicture function:
    //Load the full-size images and place onto the stage
    function showPicture(event:MouseEvent):void {
        //add new movie clip container
        var mc2:MovieClip = new MovieClip();
        addChild(mc2);
        //clear the fullLoader—this is to help clear any full-size images that may already be on the stage (they have two options, click a new thumbnail, or close the current full-size image
        fullLoader.unload();
        //re-create the fullLoader, if there was one cleared
        fullLoader = new Loader();
        //load each full size image from its location per XML node's "source" deliniated by mc.ldr's "source" attribute
        fullLoader.load(new URLRequest(event.target.name));
        //add the loder to the container
        mc2.addChild(fullLoader);
        //create new instance of second loading loop
        mc2.fsloop = new loadingLoop2();
        //add the second loading loop to the container
        mc2.addChild(mc2.fsloop);
        //for each container, add a drop shadow
        mc2.filters = [fullDShadow];
        //set the container's position center on stage, making it the size of the loading loop until the full-size images are loaded
        mc2.x = (stage.stageWidth - mc2.fsloop.width) * 0.5;
        mc2.y = (stage.stageHeight - mc2.fsloop.height) * 0.5;
        //place container on stage
        addChild(mc2);
        //fade in each container
        fadeTween = new Tween(mc2, "alpha", None.easeNone, 0, 1, 0.5, true);
        //check to see if the image has been loaded completely—this is to make sure the image's attributes can be used to re-center on stage and remove fsloop
        fullLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, removeLoop2);
        //set field to multiline so that the <br> HTML tags can be used
        imageTextField.multiline = true;
        //add text frame for description
        imageTextField.x = 10;
        imageTextField.y = 125;
        //for each full-size image, load the description text from the XML child nodes
        for (var j:int = 0; j < xmlList.length(); j++) {
            //check to make sure that the correct full-size image matches the text node when clicked
            if (xmlList[j].attribute("source") == event.target.name) {
                //add each child node as a separate line in the same text field; added HTML tags for CSS application
                imageTextField.htmlText = "<p><span class = 'projectName'>" + xmlList[j].child("projectName") + "</span><br>"
                + "<span class = 'toolsUsed'>" + xmlList[j].child("toolsUsed") + "</span><br><br>"
                + xmlList[j].child("projText") + "<br>"
                + "<span class = 'liveURL'>" + xmlList[j].child("liveURL") + "</span></p>";
        function removeLoop2(event:Event):void {
            //re-position the container to center on stage to accomodating the full sized image
            mc2.x = (stage.stageWidth - fullLoader.width) * 0.5;
            mc2.y = (stage.stageHeight - fullLoader.height) * 0.5;
            //Add the text field
            addText();
            //hide instructional text, already on stage
            galleryInfo_mc.alpha = 0;
            //remove the full-sized loading loop
            event.target.loader.parent.removeChild(MovieClip(event.target.loader.parent).loadingLoop2 );
        //set up full-size images to "self close" by clicking on it
        mc2.addEventListener(MouseEvent.CLICK, clearStage);
    The second error gets thrown when the container is clicked and the function clearStage is executed, which does not remove the container:
    "TypeError: Error #2007: Parameter child must be non-null.
        at flash.display::DisplayObjectContainer/removeChild()
        at artGallery_v1_5_fla::MainTimeline/clearStage()"
    This is the clearStage function:
    //Allow full-size image to "self close" by clikcing on it and removing the text description
    function clearStage(event:MouseEvent):void {
        //clear the fullLoader
        fullLoader.unload();
        //remove the container
        event.target.parent.removeChild(MovieClip(event.target.parent).mc2);
       //remove the text field
        removeChild(imageTextField);
        //show the instructional text that is on-stage
        galleryInfo_mc.alpha = 1;
    Help!

  • Image Gallery - Paginate detail image

    I've been looking all over (including the interakt forums) and can't find an answer.
    I've built an image gallery. Everything works just fine. However, after clicking a thumbnail to view the larger image, I would like to be able to navigate through the larger images with next and back buttons.
    How can I do this?

    I've been looking all over (including the interakt forums) and can't find an answer.
    I've built an image gallery. Everything works just fine. However, after clicking a thumbnail to view the larger image, I would like to be able to navigate through the larger images with next and back buttons.
    How can I do this?

  • Need advice/idea about Image gallery

    Hello to ALL!!!
    I'm trying to make an dynamic image gallery WITH!!! some
    active buttons above (for example: BUTTON1 with function "delete"
    and BUTTON2 with function "update") a picture and some "dataoutput"
    below (for example:Price). So, separate cell must look like:
    BUTTON1 BUTTON2
    <Image>
    PRICE
    For implementation this task I have:
    1) mySQL database "gallery" with table "test" and columns
    "Id", "path to image", "Price"
    2) 2 gifs: BUTTON1, BUTTON2
    Before my first trying I thought that it's simple, and I've
    tried:
    <!---action page---->
    <cfquery name="qTest" datasource="gallery">
    SELECT * FROM test
    </cfquery>
    <div id=imagecont>
    <cfoutput>
    <cfloop query="qTest">
    <img src="../Button1.gif />
    <img src="../Button2.gif /><br>
    <img src="#qTest.path to image#" />
    <p>#qTest.Price#</p>
    </cfloop>
    </cfoutput>
    </div>
    And it worked normal. BUT!!! Looping had a vertical
    direction! And any CSS rules that I've applied to DIV "imagecont"
    (weight, height) hadn't any effect.
    So, what I've get:
    I see all necessary information (on browser), but I don't
    know, how to format it with my dreaweawer cs3 and CSS.
    And I afraid that I've chosen a "wrong method" (I mean my
    code above)
    Please, give me some recommendations or advices.
    How can i archive my needs?
    How to use CSS in div tag, which includes <cfloop>
    code. I've also tried to use CSS with structure like:
    <div id=a>
    <cfoutput>
    <cfloop >
    <div id=b>
    DATA
    </div>
    </cfloop>
    </cfoutput>
    </div>
    But (div a)'s CSS rule HEIGHT take's no effect on <div
    id=b> :(
    And what about useful technique for displaying " action
    buttons" above each image in dynamic image gallery???
    Great THANKS for your answers/comments!!!!

    the css attribute you are looking for is FLOAT.
    see if something like
    http://www.photos-of-laos.org/top-rated.cfm
    is
    what you are after in general images layout terms. feel free
    to check
    the generated html :).
    re general css knowledge i highly recommend the book
    "Bulletproof CSS"
    by Mark Grabinski.
    re the 2 buttons above the image: consider turning them into
    css image
    overlays instead (when the buttons appear OVER [not above]
    the image
    only when a user mouses over) - it looks much better that
    way.
    hth
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

  • Dynamic picture gallery

    I'm trying to create a dynamic image gallery that is updated
    from a database, i managed to create a simple mysql database
    using phpmy admin, so I could update my image gallery more
    often, I saw something that I like but I have no idea how to create
    it here is the example:
    http://flight001.com/store/trip.htm?itemid=307&sid=201&page=2
    I didnt manage to create this with dynamic table from within
    dreamweaver 8, maybe I just don't know how,
    this is the link to a gallery on my website:
    http://www.yuvallavy.com/work/scenic/scenic.htm.
    I need all the help I can get
    I'm using dreamweaver 8 on a Mac and using PHP/MySql server
    model.

    All you need to is put a repeat region on the page and then
    apply something
    like a horizontal looper to it to get the number of images
    across that you
    want. I know that there is a commercial extension for DW but
    there also may
    be free php ones. Do a google search on horizontal looper +
    php
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "uvi" <[email protected]> wrote in message
    news:eiqtu3$c1b$[email protected]..
    > I'm trying to create a dynamic image gallery that is
    updated from a
    > database, i
    > managed to create a simple mysql database
    > using phpmy admin, so I could update my image gallery
    more often, I saw
    > something that I like but I have no idea how to create
    it here is the
    > example:
    >
    http://flight001.com/store/trip.htm?itemid=307&sid=201&page=2
    > I didnt manage to create this with dynamic table from
    within dreamweaver
    > 8,
    > maybe I just don't know how,
    > this is the link to a gallery on my website:
    >
    http://www.yuvallavy.com/work/scenic/scenic.htm.
    I need all the help I can
    > get
    > I'm using dreamweaver 8 on a Mac and using PHP/MySql
    server model.
    >
    >

  • Creating an image gallery

    Hi all,
    I am trying to work out how to create an image gallery on a
    page whereby there is a set of thumbnails to the side and the
    relevant large image opens adjacent to the thumbnails when they are
    moused over.
    I have done this using the hide/show layers function but the
    output appears incosistently in different browsers and/or window
    sizes. I had in mind some adaptation of the "swap image" behaviour
    that would open the swap in a different position? Or alternatively
    making the layers approach display consistently?
    The layers version of the page can be
    viewed
    here
    Any suggestions or guidance would be greatly appreciated,
    thanks in advance,
    Graham

    On Thu, 1 Feb 2007 15:25:09 +0000 (UTC), "hydroculture"
    <[email protected]> wrote:
    >I don't know the answer - wish I did, but I have been
    using a substitute where
    >I click on the thumbnail - which via a hyperlink takes me
    to a page where the
    >large image appears. Not as neat as what we both want ,
    but gets the same
    >effect,
    If clicking a thumbnail is an option then this is a better
    solution -
    a free extension from PVII:
    http://www.projectseven.com/tutorials/images/showpic/index.htm
    Steve
    steve at flyingtigerwebdesign dot com

  • Urgent Help with Image Gallery

    Hi,
    I really need help with an image gallery i have created. Cannot think of a resolution
    So....I have a dynamic image gallery that pulls the pics into a movie clip and adds them to the container (slider)
    The issue i am having is that when i click on this i am essentially clicking on all the items collectively and i would like to be able to click on each image seperately...
    Please see code below
    var xml:XML;
    var images:Array = new Array();
    var totalImages:Number;
    var nbDisplayed:Number = 1;
    var imagesLoaded:int = 0;
    var slideTo:Number = 0;
    var imageWidth = 150;
    var titles:Array = new Array();
    var container_mc:MovieClip = new MovieClip();
    slider_mc.addChild(container_mc);
    container_mc.mask = slider_mc.mask_mc;
    function loadXML(file:String):void{
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.load(new URLRequest(file));
    xmlLoader.addEventListener(Event.COMPLETE, parseXML);
    function parseXML(e:Event):void{
    xml = new XML(e.target.data);
    totalImages = xml.children().length();
    loadImages();
    function loadImages():void{
    for(var i:int = 0; i<totalImages; i++){
      var loader:Loader = new Loader();
      loader.load(new URLRequest("images/"+String(xml.children()[i].@brand)));
      images.push(loader);
    //      loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onProgress);
         loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
    function onComplete(e:Event):void{
    imagesLoaded++;
    if(imagesLoaded == totalImages){
      createImages();
    function createImages():void{
    for(var i:int = 0; i < images.length; i++){
      var bm:Bitmap = new Bitmap();
      bm = Bitmap(images[i].content);
      bm.smoothing = true;
      bm.x = i*170;
      container_mc.addChild(bm);
          var caption:textfile=new textfile();
          caption.x=i*170; // fix text positions (x,y) here
       caption.y=96;
          caption.tf.text=(xml.children()[i].@brandname)   
          container_mc.addChild(caption);

    yes, sorry i do wish to click on individual images but dont know how to code that
    as i mentioned i have 6 images that load into an array and then into a container and i think that maybe the problem is that i have the listener on the container so when i click on any image it gives the same results.
    what i would like is have code thats says
    if i click on image 1 then do this
    if i click on image 2 then do something different
    etc
    hope that makes sense
    thanks for you help!

  • PVII Image Gallery - Multiple

    I am using the PVII extension for Image galleries. I have a current page that is updated regularly and I would like to add multiple image galleries on the one page. But when I go to add a new gallery it only offers the possiblitiy of editing the current, and only, image gallery on that page.
    Is it possible to have more than one gallery on a single page?
    If so, how do you crewate a new one without altering the one which already exists?
    Thanks, in advance.
    M

    I do not use PVII, and it would be best if you ask them if it is possible to do this with their product.
    But having said that, you could use fireworks or one of the other extensions from the dreamwever exchange to do this, as there would then be no code conflict.
    DW exchange - http://www.adobe.com/cfusion/exchange/index.cfm?searchfield=image+gallery&search_exchange= 3&search_category=-1&search_license=&search_rating=&search_platform=0&search_pubdate=&num= 25&startnum=1&event=search&sticky=true&sort=0&rnav_dummy_tmpfield=&Submit=
    PZ

  • Detail Page empty

    Hi There,
    I am creating a dynamic link from a news item in my index.php
    page. I have highlighted the field (in index.php) I want to use as
    the dynamic link to the detail page and used the 'go to detail page
    for PHP server behaviour'. This links to my detail page called
    'newscontent.php'. On newcontent.php, I have created a filtered
    recordset which filters by newsID (which is the primary key in the
    Mysql database). Using the simple recordset dialog, I did a test
    and entered in a test value for URL parameter: newsID. This works
    successfully and returns the appropriate records from the database.
    Therefore as things seem to be working so far, I have dragged the
    newsTitle and newsContent onto my detail page so that when the user
    clicks on the link in the index.php page, it will show the title
    and content in the detail page.
    However things are not working. In the newscontent.php, when
    I do live data view, nothing appears on the page (which is weird
    because the recordset works fine!!). Even when I view my index.php
    page in my browser and try and link to the detail page, it goes to
    the detail page no problem but no data is on the page!!! It is just
    empty.
    I must be doing something really daft, so if someone can spot
    a mistake in my strategy here, that would be much appreciated.
    dmlocke

    This seems sort of pointless to ask, but just in case??? You
    say:
    "I have highlighted the field (in index.php)" Do you mean
    "textfield?" Anyways, I would think that you'd want to use a
    dynamically populated menu which then pins the newsID using a URL
    parameter or session variable. Anyways, what I'm getting at is: You
    have somehow included the newsID chosen on index.php in the
    information that's sent to the detail page request and then used
    that to filter the SQL query that you already said work when you
    PERSONALLY designate a value, right?
    Good luck! Hopefully my query, will help you with your
    query!

  • Image gallery approach for additional details and add to cart option?

    With efficiency and minimalist downloads for smartphone users I would appreciate advice on a product image gallery.
    Currently I have an intro page and other simple information pages. My gallery pages ( four distinct pages for different leather goods) need  either a pop up or a link to a new page for additional details and an option to add to cart.
    Within the image gallery, How should I link each photo to the new detail/cart page? Can clicking  the image itself be the action or do I need a button?

    I made a mistake. I think I got it right this time. The pop up of the title box works but the images are all gone.
    <!DOCTYPE>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Lapinel Arts Leatherwork</title>
    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
    <link href='http://fonts.googleapis.com/css?family=Overlock:400,700|Simonetta:400,900|Marcellus|Junge' rel='stylesheet' type='text/css'>
    <style>
    box-sizing: border-box;
    body {
    margin: 0;
    padding: 0;
    background: #fff;
    font: 14px/20px 'Lucida Sans',sans-serif;
    .wrap {
    overflow: hidden;
    .box {
    float: left;
    position: relative;
    width: 25%;
    text-align: center;
    margin-bottom: 24px;
    .boxInner {
    position: relative;
    text-align: center;
    margin: 0 12px;
    overflow: hidden;
    img {
    max-width: 100%;
    .titleBox {
    position: absolute;
    bottom: 0;
    width: 100%;
    margin-bottom: -70px;
    background: #000;
    background: rgba(0, 0, 0, 0.5);
    color: #FFF;
    padding: 10px;
    text-align: center;
    -webkit-transition: all 0.3s ease-out;
    -moz-transition: all 0.3s ease-out;
    -o-transition: all 0.3s ease-out;
    transition: all 0.3s ease-out;
    .titleBox h2 {
    font-size: 16px;
    margin: 0;
    padding: 0 0 5px 0;
    .titleBox a {
    text-decoration: none;
    color: #fff;
    .boxInner:hover .titleBox {
    margin-bottom: 0;
    @media only screen and (max-width : 768px) {
    .box {
    width: 50%;
    margin-bottom: 24px;
    @media only screen and (max-width : 480px) {
    .box {
    width: 100%;
    @media only screen and (max-width : 1290px) and (min-width : 1051px) {
       /* Medium desktop: 4 tiles */
       .box {
          width: 25%;
          padding-bottom: 25%;
    </style>
    <style>
    section, header, nav {
    display: block;
        box-sizing: border-box;
    body{
    font-family: 'Marcellus', normal;
    background-image: url(DRA-042010-LeatheryTexture-MBFT.jpg);
    font-size: 90%;
    line-height: 140%;
    color: #555;
    margin: 0;
    padding: 0;
    background-color: #FFF;
    #hover-image {
    background-color: #cfc6b0;
    text-align: center;
    img {
    max-width: 100%;
    height: auto;
    .container {
    width: 85%;
    max-width: 1000px;
    margin: 0 auto;
    color: #000;
    header h1 {
    font-size: 300%;
    line-height: 150%;
    text-align: center;
    letter-spacing: 4px;
    padding: 20px 0;
    color: #000;
    font-weight: bold;
    /* top level navigation */
    nav {
        background-color: #E5E4E2;
    nav ul {
    display: block;
    text-align: center;
    margin: 0;
    padding: 0;
    nav li {
    margin: 0;
    padding: 0;
    display: inline;
    position: relative;
    nav a {
        display: inline-block;
        text-decoration: none;
        padding: 10px 25px;
        color: #000;
    nav a:hover {
        background-color: #cfc6b0;
        color: #000;
    nav span {
    display: none;
    /* droplist navigation */
    nav ul ul {
    position: absolute;
    z-index: 1000;
    left: 0;
    top: 2em;
    background-color: #E5E4E2;
    text-align: left!important;
    display: none;
    nav ul ul li a {
    display: block;
    width: 12em;
    border-top: 1px dotted #ccc;
    .about {
    padding: 0 8%;
    margin: 0 auto;
    text-align: center;
    background-color: #E5E4E2;
    .about h2 {
        font-size: 260%;
        line-height: 200%;
        margin: 0;
        padding: 0;
        color: #000;
    .about p {
    font-size: 110%;
    line-height: 150%;
    margin: 0;
    padding: 0 0 20px 0;
    .productsWrapper {
    background-color: #000;
    overflow: hidden;
    padding: 30px 25px;
    .product {
    float: left;
    width: 25%;
    padding: 12px;
    text-align: center;
    color: #fff;
    .product img {
    border: 1px solid #fff;
    .view_details {
    text-decoration: none;
    display: inline-block;
    padding: 15px 20px;
    border-radius: 6px;
    border: 1px dotted #ccc;
    color: #555;
    background-color: #fff;
    .view_details:hover {
    background-color: #E5E4E2;
    #mobileTrigger {
    padding: 10px 25px;
    font-size: 120%;
    display: none;
    color: #000;
    footer {
    clear: both;
    background-color: #cfc6b0;
    padding: 30px;
    color: #fff;
    text-align: center;
    overflow: hidden;
    footer a {
    text-decoration: none;
    color: #000;
        float: left;
        width: 33.33%;
        color: #000;
        border: #000
    .footerBox {
        float: left;
        width: 33.33%;
        color: #000;
    @media screen and (max-width: 768px) {
        .container {
    width: 100%;
    .product {
    width: 50%;
    #mobileTrigger {
    display: block;
    text-align: right;
    nav ul {
    display: none;
    nav li {
    display: block;
    text-align: left;
    nav a {
    display: block;
    font-size: 120%;
    border-top: 1px dotted #ccc;
    nav span {
    display: inline-block;
    float: right;
    font-size: 130%;
    /* droplist navigation */
    nav ul ul {
    position: static;
    nav ul ul li a {
    width: 100%;
    @media screen and (max-width: 480px) {
    .product {
    float: none;
    width: 100%;
    body,td,th {
    font-family: Marcellus, normal;
    #copyright {
    color: #000;
    font-weight: bold;
    </style>
    <script type="text/javascript" src="http://lapinelarts.com/JS/jquery-1.11.2.min.js"></script>
    <script type="text/javascript" src="http://lapinelarts.com/JS/jquery.cycle2.min.js"></script>
    <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
    <script>
    $(document).ready(function() {
    //activate mobile navigation icon when window is 768px
    $('#mobileTrigger').css('cursor','pointer').click(function() {
    $('#mobileTrigger i').toggleClass('fa-bars fa-times');
    $('nav ul').toggle();
    // show main desktop navigation onresize/hide sub navigation
    $(window).on('resize', function(){
    var win = $(this); //this = window
    if (win.width() > 768) {
    $('nav ul').show();
    $('nav ul ul').hide();
    //listen for navigation li being clicked
    $('nav ul li').click(function() {
    $(this).find('ul').slideToggle();
    //toggle font awesome icons
    $(this).find('i').toggleClass('fa-bars fa-times');
    //events if window is less than 768px
    if ($(window).width() < 768) {
    //stops submenu sliding up when mouse leaves mobile
    $('nav ul ul').show();
    else {
    //activate desktop submenu on hover
    $('nav ul li').mouseenter(function() {
    $(this).find('ul').slideToggle();
    //toggle font awesome icons
    $(this).find('i').toggleClass('fa-bars fa-times');
    //desktop submenu slides up when mouse leaves ul/li
    $('nav ul ul').mouseleave(function() {
    $(this).slideUp();
    $('nav ul li').mouseleave(function() {
    $(this).find('ul').slideUp();
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    </script>
    <style type="text/css">
    </style>
    </head>
    <body onLoad="MM_preloadImages('810_0776_smaller.jpg')">
    <header>
    <h1>LAPINEL ARTS LEATHERWORKS</h1>
    <nav>
    <div id="mobileTrigger"><i class="fa fa-bars"></i></div>
    <ul>
    <li><a href="#">ABOUT US</a></li>
    <li><a href="#">PROCESS</a></li>
    <li><a href="#">PRODUCTS<span><i class="fa fa-bars"></i></span></a>
    <ul>
    <li><a href="#">PURSES</a></li>
    <li><a href="#">POUCHES</a></li>
    <li><a href="#">TOTES</a></li>
    <li><a href="#">WALLETS</a></li>
    </ul>
    </li>
    <li><a href="#">CART</a></li>
    <li><a href="#">CONTACT</a></li>
    </ul>
    </nav>
    </header>
    <section class="about">
    <h2>PURSES</h2>
    <p>There are several styles and sizes of purses available. Custom orders can be arranged but most of these purses are unique and with limited runs of art styles.</p>
    <p>Please click on the detail button for larger and additional views and the opportunity to add the item to your cart.<strong></strong></p>
    </section>
    <div id="hover-image">
    <div class="wrap">
    <!-- Define all of the tiles: -->
    <div class="box">
    <div class="boxInner">
    <img src="http://oddiant.poatemisepare.ro/wp-content/uploads/Viceroy-Butterfly-Limenitis-archippus.j pg" />
    <div class="titleBox">
    <h2>Butterfly</h2>
    <a href="http://www.bbc.co.uk">View Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="http://oddiant.poatemisepare.ro/wp-content/uploads/Viceroy-Butterfly-Limenitis-archippus.j pg" />
    <div class="titleBox">
    <h2>Butterfly</h2>
    <a href="http://www.bbc.co.uk">View Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="http://oddiant.poatemisepare.ro/wp-content/uploads/Viceroy-Butterfly-Limenitis-archippus.j pg" />
    <div class="titleBox">
    <h2>Butterfly</h2>
    <a href="http://www.bbc.co.uk">View Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    <div class="box">
    <div class="boxInner">
    <img src="http://oddiant.poatemisepare.ro/wp-content/uploads/Viceroy-Butterfly-Limenitis-archippus.j pg" />
    <div class="titleBox">
    <h2>Butterfly</h2>
    <a href="http://www.bbc.co.uk">View Details</a>
    </div>
    </div>
    <!-- end boxInner -->
    </div>
    <!-- end box -->
    </div>
    <!-- end wrap -->
    <footer>
      <div class="footerBox"><a href="mailto:[email protected]">EMAIL CATHY </a></div>
    <div class="footerBox"><a href="https://www.facebook.com/LapinelArtsLeatherwork"> FACEBOOK</a></div>
    <div class="footerBox">COPYRIGHT 2015</div>
    </footer>
    </div>
    </body>
    </html>

Maybe you are looking for