PDA

View Full Version : CMotion Image Gallery (Scrolling)



dydoyaga
04-17-2006, 03:25 PM
Sorry in advance for my ignorance...
I can not figure out why the script seems to function... but i get no scrolling images.

Will you please help me!!
css and js file are in the right spots:

http://ntsos2.medensure.com/gallery2.html

jscheuer1
04-17-2006, 05:37 PM
You have a script conflict with the:


<script type="text/javascript" src="scripts/nav_functions.js"></script>

script. Either remove it or, in motiongallery.js, go the bottom and change this:


window.onload=fillup

to:


if ( typeof window.addEventListener != "undefined" )
window.addEventListener( "load", fillup, false );
else if ( typeof window.attachEvent != "undefined" )
window.attachEvent( "onload", fillup );
else {
if ( window.onload != null ) {
var oldOnload = window.onload;
window.onload = function ( e ) {
oldOnload( e );
fillup();
};
}
else
window.onload = fillup;
}

In order to be kind to folks who may be surfing with very old browsers, you should also put the calls for the other two scripts before cmotion:


<script type="text/javascript" src="scripts/nav_functions.js"></script>
<script src="scripts/sifr.js" type="text/javascript"></script>
<script type="text/javascript" src="scripts/motiongallery.js">
/***********************************************
* CMotion Image Gallery- ? Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/
</script>

This is not required for modern browsers.

dydoyaga
04-17-2006, 08:10 PM
Thanks so much... It worked great. Last question...

Is it possible to break the images displayed on multiple rows and scroll each row separatly.

thanks again.

http://ntsos2.medensure.com/gallery.html

dydoyaga
04-18-2006, 02:53 PM
never mind.... i found the ref question to the iframe fix for multiple scripts.

I'm also looking for how to add a caption to the image or maybe a brief description when it loads popup. I will see if i can find ref to this in the forum

Thank you so very much for your help.

jscheuer1
04-18-2006, 05:22 PM
I'm also looking for how to add a caption to the image or maybe a brief description when it loads popup.

I'm not sure if you mean a caption for the the images as they slide by, and/or for them once they are in the pop-up. Both are possible and have been covered elsewhere. Let us know if you are having trouble finding and/or using the references.

lilithfiend
04-21-2006, 05:31 AM
hi guys, i'm facing the exact same problem..the script works (it opens the enlarged image in a popup window) but it just doesn't scroll..

i've tried following the advice jscheuer1 has given but it still doesn't work..

HELP! :(

Attached is the code in .txt format..

jscheuer1
04-21-2006, 06:02 AM
hi guys, i'm facing the exact same problem..the script works (it opens the enlarged image in a popup window) but it just doesn't scroll..

i've tried following the advice jscheuer1 has given but it still doesn't work..

HELP! :(

Attached is the code in .txt format..


Your case is simpler but also could be solved using the method shown in post #2 (http://www.dynamicdrive.com/forums/showpost.php?p=33149&postcount=2) in this thread (just the part in the middle two code blocks about replacing the window.onload call in the script). Another, as I say simpler, method would be to remove:


window.onload=fillup

from the script ans add it like so, to your body onload event:


<body onLoad="fillup();MM_preloadImages('images/link_01_.gif','images/link_02_.gif','images/link_03_.gif','images/link_04_.gif','images/link_05_.gif','images/link_R_.gif')">

Either of these two methods will prevent onload conflicts between the script and the MM_preloadImages() function. There could be other problems.

lilithfiend
04-21-2006, 06:26 AM
thanks for the advice..ok this is what i did:

1) removed
window.onload=fillup from the motiongallery.jsp file

2) added
<body onLoad="fillup();MM_preloadImages('images/link_01_.gif','images/link_02_.gif','images/link_03_.gif','images/link_04_.gif','images/link_05_.gif','images/link_R_.gif')"> to my html file

is this correct?

cos i did it, but it still doesn't work..

jscheuer1
04-21-2006, 07:41 AM
thanks for the advice..ok this is what i did:

1) removed
window.onload=fillup from the motiongallery.jsp file

2) added
<body onLoad="fillup();MM_preloadImages('images/link_01_.gif','images/link_02_.gif','images/link_03_.gif','images/link_04_.gif','images/link_05_.gif','images/link_R_.gif')"> to my html file

is this correct?

cos i did it, but it still doesn't work..

There must be other problems, either that or you have an old version of the page cached or lying around somewhere that is getting used.

A link to your page would be best for troubleshooting.

lilithfiend
04-21-2006, 09:41 AM
i've already tried deleting the temp files and refreshed many times..

here's the link (http://www.vignamotor.com/test/services.htm)to the page..appreciate your help!

jscheuer1
04-21-2006, 04:45 PM
There is another problem, I probably could have found it without the link but, seeing the pictures and layout as they were intended to be always helps me for some reason and allows me to check for problems with linked files. Most important is this part of your HTML markup:


<div id="motiongallery" style="position:absolute;centre:0;top:0;white-space: nowrap;">

It should be:


<div id="motiongallery" style="position:absolute;left:0;top:0;white-space: nowrap;">

I also notice that you have no closing </nobr> tag. This doesn't cause a problem in the two browsers that I tested in but, it may in some, add it here:


<a href="javascript:enlargeimage('images/services26.jpg')"><img src="images/services_sm26.jpg" border=1></a>
</nobr>
</div>
</div></td>
</tr>

lilithfiend
04-26-2006, 06:42 AM
thank you so much! that helped solve it.. cheers..;)

dipper85
03-26-2010, 05:48 AM
hi everybody, just wondering if it is possible to have a description of the image appear on either a mouse click or when the image is scrolled over?

Not sure if this has been covered somewhere but if it has maybe you could point me in the rite direction.