Link to home
Start Free TrialLog in

asked on

js conflict

Hey guys i am having problem with my javasrcipts it keep giving me this error

Uncaught RangeError: Invalid array length

i have a sildeshow and a lightbox when i click on a image it opens.

i have a problem my slideshow do not work

please help here is my code below:

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

        var mygallery=new fadeSlideShow
        wrapperid: "fadeshow",
        dimensions: [731, 240],
        imagearray: [
        ["images/master/banner-show/001.jpg", "", "", ""],
        ["images/master/banner-show/002.jpg", "", "", ""],
        ["images/master/banner-show/003.jpg", "", "", ""],
        ["images/master/banner-show/004.jpg", "", "", ""],
        ["images/master/banner-show/005.jpg", "", "", ""],
        ["images/master/banner-show/006.jpg", "", "", ""],
        ["images/master/banner-show/007.jpg", "", "", ""],
        ["images/master/banner-show/008.jpg", "", "", ""]
        displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
        persist: false,
        fadeduration: 900,
        descreveal: "ondemand",
        togglerid: ""

    <script type="text/javascript" src="js/prototype.js"></script>
    <script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
    <script type="text/javascript" src="js/lightbox.js"></script>
    <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
Avatar of Roopesh Reddy
Roopesh Reddy
Flag of India image

Did you tried jQuery.noConflict();

Hope it helps u...


nope please show me where to place the code?

Before that did you contact the Author who created the fadeslideshow plugin?

If not, contact them to solve the issue! Actually they can assist you better!

Hope it helps u..
i got it from

i see in the  fadeslideshow  js there a jQuery.noConflict()

 /* Ultimate Fade-in slideshow (v2.4)
* Last updated: May 24th, 2010. This notice must stay intact for usage 
* Author: Dynamic Drive at
* Visit for full source code

//Oct 6th, 09' (v2.1): Adds option to randomize display order of images, via new option displaymode.randomize
//May 24th, 10' (v2.4): Adds new "peakaboo" option to "descreveal" setting. oninit and onslide event handlers added.

var fadeSlideShow_descpanel = {
    controls: [['x.png', 7, 7], ['restore.png', 10, 11], ['images/master/banner-show/loading.gif', 54, 55]], //full URL and dimensions of close, restore, and loading images
    fontStyle: 'normal 11px Verdana', //font style for text descriptions
    slidespeed: 200 //speed of description panel animation (in millisec)

//No need to edit beyond here...


function fadeSlideShow(settingarg) {
    this.setting = settingarg
    settingarg = null
    var setting = this.setting
    setting.fadeduration = setting.fadeduration ? parseInt(setting.fadeduration) : 500
    setting.curimage = (setting.persist) ? fadeSlideShow.routines.getCookie("gallery-" + setting.wrapperid) : 0
    setting.curimage = setting.curimage || 0 //account for curimage being null if cookie is empty
    setting.currentstep = 0 //keep track of # of slides slideshow has gone through (applicable in displaymode='auto' only)
    setting.totalsteps = setting.imagearray.length * (setting.displaymode.cycles > 0 ? setting.displaymode.cycles : Infinity) //Total steps limit (applicable in displaymode='auto' only w/ cycles>0)
    setting.fglayer = 0, setting.bglayer = 1 //index of active and background layer (switches after each change of slide)
    setting.oninit = setting.oninit || function() {
    setting.onslide = setting.onslide || function() {
    if (setting.displaymode.randomize) //randomly shuffle order of images?
        setting.imagearray.sort(function() {
            return 0.5 - Math.random()
    var preloadimages = [] //preload images
    setting.longestdesc = "" //get longest description of all slides. If no desciptions defined, variable contains ""
    for (var i = 0; i < setting.imagearray.length; i++) { //preload images
        preloadimages[i] = new Image()
        preloadimages[i].src = setting.imagearray[i][0]
        if (setting.imagearray[i][3] && setting.imagearray[i][3].length > setting.longestdesc.length)
            setting.longestdesc = setting.imagearray[i][3]

Open in new window

Avatar of Michael

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial