Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 32

Thread: [DHTML] Cmotion Major Upgrade

  1. #11
    Join Date
    Sep 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Bug In Current Code

    There is a bug in the current code, and can be seen on http://www.dynamicdrive.com/dynamici...iongallery.htm

    "Line 168 - Invaild Argument"

    Which is - cross_scroll.style.left=(menuwidth-actualwidth)/startpos+'px';

    Rob.

  2. #12
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,878
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    In which browser? Which version? What were you doing when the error appeared?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #13
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by Twey
    In which browser? Which version? What were you doing when the error appeared?
    I think I see it, in FF it is reported as:

    Error: Error in parsing value for property 'left'. Declaration dropped.
    Source File: http://www.dynamicdrive.com/dynamici...iongallery.htm
    Line: 0
    and I get it in IE as line 169. But, since it only happens onresize, it must be that line (red) from the function:

    Code:
    onresize=function(){
    if (typeof motioncontainer!=='undefined'&&motioncontainer.filters){
    motioncontainer.style.width="0";
    motioncontainer.style.width="";
    motioncontainer.style.width=Math.min(motioncontainer.offsetWidth, maxwidth)+'px';
    }
    menuwidth=crossmain.offsetWidth;
    cross_scroll.style.left=(menuwidth-actualwidth)/startpos+'px';
    }
    which just happens to be line# 168 in motiongallery.js. I think it comes from dividing by zero which, in this case, produces negative infinity. The error disappears if 'startpos' is other than 0 in the configuration. So, you can make that line be:

    Code:
    cross_scroll.style.left=startpos? (menuwidth-actualwidth)/startpos+'px' : 0;
    If that does in fact take care of the problem (should) and causes no new error(s), I would recommend that the demo page be updated with this fix.

    Added Later: Seems to do the trick!
    Last edited by jscheuer1; 09-01-2006 at 06:59 PM. Reason: add test results
    - John
    ________________________

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

  4. #14
    Join Date
    Aug 2004
    Posts
    9,918
    Thanks
    3
    Thanked 969 Times in 957 Posts
    Blog Entries
    15

    Default

    Great, thanks John. Script on DD updated with this little fix as well.

  5. #15
    Join Date
    Sep 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Noob Question

    I'm trying to change the width of the main gallery/div. I've looked around the motiongallery.js and have had no luck. I did not changing anything within motiongallery.js. Can some one please help me. Thanx in advance

  6. #16
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    As this script is now available in the Dynamic Drive scripts library:

    http://www.dynamicdrive.com/dynamici...iongallery.htm

    It would be better to post a question of this nature in the main Dynamic Drive Scripts Help forum.

    The dimensions of the gallery are set in the gallerystyle.css file. If you need more help, please use the main help forum.
    - John
    ________________________

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

  7. #17
    Join Date
    Sep 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    i need to put an image above the scropt but i cant do .. can u help me ??

  8. #18
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by 3bood
    i need to put an image above the scropt but i cant do .. can u help me ??
    Please use the main Dynamic Drive Scripts Help forum:

    http://www.dynamicdrive.com/forums/forumdisplay.php?f=2
    - John
    ________________________

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

  9. #19
    Join Date
    Oct 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default hover in FF Issue

    This works great in IE, however when I hover over the images in FF the border disappears and the image flickers.

  10. #20
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,167
    Thanks
    44
    Thanked 3,240 Times in 3,201 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by sabodj
    This works great in IE, however when I hover over the images in FF the border disappears and the image flickers.
    Does this happen on the demo page? If not, it is a problem with your implementation and it would be better to post a new thread in the main help section:

    http://www.dynamicdrive.com/forums/forumdisplay.php?f=2
    - 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
  •