We help IT Professionals succeed at work.

js conflict

Last Modified: 2012-06-07
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="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></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" />
Watch Question

Roopesh ReddyIT Analyst
Top Expert 2012

Did you tried jQuery.noConflict();


Hope it helps u...


nope please show me where to place the code?
Roopesh ReddyIT Analyst
Top Expert 2012


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 http://www.dynamicdrive.com/

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 http://www.dynamicdrive.com/
* Visit http://www.dynamicdrive.com/ 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

This one is on us!
(Get your first solution completely free - no credit card required)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.