Results 1 to 2 of 2

Thread: 2 CMotion galleries on one page

  1. #1
    Join Date
    Aug 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 2 CMotion galleries on one page

    1) Script Title: cmotion image gallery

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...iongallery.htm

    3) Describe problem: 2 gallerys on one page

    I would like two seperate image lines (scrolling) on a page but when an image is clicked on either of them the image is displayed in the same place, anyone know how to do this?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    For the first part (more than one Cmotion Gallery on a page), it would be best to use an object oriented Cmotion script like:

    http://home.comcast.net/~jscheuer1/s...cmotion_oo.htm

    Which was introduced here:

    http://www.dynamicdrive.com/forums/s...ad.php?t=13302

    For the second part, you would want to configure the onclick event for each image in the both galleries.

    To best determine how to do that, I would need to know what you mean by 'place' when you say:

    is displayed in the same place
    One way would be to have a display image somewhere on the page, like:

    HTML Code:
    <img id="displayarea" src="whatever.jpg">
    Then in the OO Cmotion script have like:

    Code:
    gallery[0]='<a href="photo1_large.jpg" onclick="document.getElementById(\'displayarea\').src=this.href;return false;"><img src="photo1.jpg" border="1"></a>';
    for each entry. Get step one working first (two Cmotion Galleries on one page). If you have trouble with step two (or for that matter, step one), there are many ways things can be done, let me know.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •