Results 1 to 3 of 3

Thread: Lightbox 2.04 javascript error

  1. #1
    Join Date
    Mar 2007
    Posts
    8
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Lightbox 2.04 javascript error

    1) Script Title: Lightbox 2.04

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

    3) Describe problem: I get an javascript error the first time I open each picture. Everything works fine but I get the error. The error message is :

    Line: 1922
    Char: 9
    Error: Invalid argument

    This is located in the prototype.js file:

    setStyle: function(element, styles) {
    element = $(element);
    var elementStyle = element.style, match;
    if (Object.isString(styles)) {
    element.style.cssText += ';' + styles;
    return styles.include('opacity') ?
    element.setOpacity(styles.match(/opacity:\s*(\d?\.?\d*)/)[1]) : element;
    }
    for (var property in styles)
    if (property == 'opacity') element.setOpacity(styles[property]);
    else
    elementStyle[(property == 'float' || property == 'cssFloat') ?
    (Object.isUndefined(elementStyle.styleFloat) ? 'cssFloat' : 'styleFloat') : property] = styles[property];
    return element;
    },

    any idea why this happens?

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Do you notice this on the demo page, if not:

    Please post a link to the page on your site that contains the problematic script so we can check it out.

    See these threads for proper posting format when asking a question.
    http://www.dynamicdrive.com/forums/showthread.php?t=6
    http://www.dynamicdrive.com/forums/s...ad.php?t=19533
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    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

    Quote Originally Posted by kayj View Post
    1) Script Title: Lightbox 2.04
    I don't know if that's just a typo or what, but the script here on DD is v2.03a. Version 2.04 is fairly different and not all of the support files are interchangeable.

    If you are mixing the scripts, that could be an issue. A link to your page would help. Also, what browser are you getting this error in?
    - 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
  •