Avatar of JCWEBHOST
JCWEBHOST
 asked on

js conflict

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

Uncaught RangeError: Invalid array length
 this.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>
    <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" />
ASP.NETJScriptjQuery

Avatar of undefined
Last Comment
Michael

8/22/2022 - Mon
Roopesh Reddy

Hi,
Did you tried jQuery.noConflict();

http://stackoverflow.com/questions/8420018/conflict-between-jquery-and-prototype

Hope it helps u...
JCWEBHOST

ASKER
nope please show me where to place the code?
Roopesh Reddy

Hi,

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..
Your help has saved me hundreds of hours of internet surfing.
fblack61
JCWEBHOST

ASKER
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...

jQuery.noConflict()

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

ASKER CERTIFIED SOLUTION
Michael

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question