View Full Version : How do I lose the frames and still keep CMotion Gallery?

07-06-2011, 01:23 AM
1) Script Title: CMotion Image Gallery

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/cmotiongallery.htm#

3) Describe problem: Our frames-based website makes heavy use of jscheuer1's CMotion Image Gallery script as an ever-present portfolio menu of packaging icons running along the bottom.


I love how it looks, but now I want to redo our site without frames. I'm hoping to keep the same functionality with the CMotion Image Gallery menu at the bottom, but I'm not sure which non-frames alternative would work best.

php?... iframes?...

I could certainly combine the frames into multiple single pages, but using the script the way that I am—to swap web pages, rather than just swap images, seems more difficult without a frameset. The problem that I can't figure out is how I can set it up so that clicking the bottom menu would still change the portfolio page without then resetting the Motion Gallery to its default position.

In other words, I'd like to still be able to click on a package icon in the moving menu, and have the html content change, but have the menu stay wherever it is--and not reset to the left or the center of the image train. That's the way it works now because of the frames.


07-06-2011, 04:14 PM
A cookie could be used to remember the position. However, this would break the script's ability to use a percentage width in the stylesheet here:

/* Gallery Styles */

#motioncontainer {
/*margin:0 auto; Uncomment this line if you wish to center the gallery on page */
width: 50%; /* Set to gallery width, in px or percentage */
height: 130px; /* Set to gallery height */

A pixel width would have to be specified. Is that feature important to you?

07-06-2011, 05:26 PM
Hi jscheuer1,

Thank you for the help.

I am using pixel size rather than % to specify width, so that shouldn't pose an obstacle...

/* Gallery Styles */

#motioncontainer {
width: 3800px;
height: 149;
visibility: visible;
top: 1px;

How would I go about using cookies to maintain the menu's position?

07-06-2011, 06:18 PM
Put the same gallery markup on all the pages where you want it and use this modified version of the script:


You may use a PHP include for the gallery markup if you like. But first set it up as a normal page to make sure you are not missing anything with the script or markup. Once it is an include, it would probably be best to use absolute paths for the images and links.

07-06-2011, 07:20 PM
John, Thanks so much. You've probably saved me days of trial & error groping in the dark. Very much appreciated! -Randy