Results 1 to 3 of 3

Thread: incompatibilities

  1. #1
    Join Date
    Nov 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default incompatibilities

    Hi all,

    I can not make the Tab Content Script works with the CMotion Image Gallery or with this script (which does not come from DD ) :


    Code:
    <!--
    //The speed of the timeout between each scroll.
    timSpeed=50
    
    //The height of the container (change this when it scrolls to much or to little)
    contHeight=507
    
    function makeScrollObj(obj,nest){
            nest=(!nest) ? '':'document.'+nest+'.' ;
    		if (n6){
    			this.css=document.getElementById(obj).style ;
    		} else if (n){
    			this.css=eval(nest+'document.'+obj) ;
    		} else if (ie){
    			this.css=eval('document.all.'+obj+'.style') ;
    		}
    		if (n6){
    			this.scrollHeight=document.getElementById(obj).offsetHeight ;
    		} else if (n){
    			this.scrollHeight=this.css.document.height ;
    		} else if (ie){
    			this.scrollHeight=eval('document.all.'+obj+'.offsetHeight') ;
    		}
    		                                                                                                                     
            this.top=b_gettop                                                                               
            return this
    }
    
    //Getting the top for the top method
    function b_gettop(){
    		if (n6){
    			var gleft=parseInt(this.css.top) ;
    		} else if (n){
    			var gleft=eval(this.css.top) ;
    		} else if (ie){
    			var gleft=eval(this.css.pixelTop) ;
    		}
            return gleft;
    }
    //Variables
    var hasInit = false ;
    var scrollTim;
    var active=0;
    
    function scroll(speed){
    	if (hasInit){
            clearTimeout(scrollTim)
            way=speed>0?1:0
            if((!way && oScroll[active].top()>-oScroll[active].scrollHeight+contHeight) || (oScroll[active].top()<0 && way)){
                    oScroll[active].css.top=oScroll[active].top()+speed
                    scrollTim=setTimeout("scroll("+speed+")",timSpeed)
            }
    	}
    }
    //Clears the timeout so the scroll stops, this is called onmouseout.
    
    function noScroll(){
            clearTimeout(scrollTim)
    }
    
    
    
    function scrollInit(){
            oScroll=new Array()
            oScroll[0]=new  makeScrollObj('content','Pcontent')
            
            oScroll[0].css.visibility='visible'
    		hasInit = true ;
    }
    /*********************************************************************************
    Executes the scrollInit function on pageload.
    *********************************************************************************/
    onload=scrollInit;
    //-->
    I have looked for a solution by myself but it seems I was a bit too presumptuous...

    Can anyone help me, please ?

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

    This is a stock response:

    Note: Questions regarding multiple script usage are not usually replied to due to their time consuming nature. See this thread for more information, and this tutorial for one possible solution.

    Aside from the tutorial above, which usually is the solution when the problem is two different scripts, you may need to consult:

    http://www.howtocreate.co.uk/tutoria...allshow#refcon

    Which explains how two scripts on the same page may not use the same set of variable names, id names, function names, etc. This is especially important if the problem is two copies of the same script on a page but, can come into play with two different scripts when the first step won't fix it.

    One other approach that works in both situations, if adaptable to one (or more) of the scripts, is to put one script in a borderless iframe. It will look like it is on the same page but, since it really is on a separate page, conflicts are no longer an issue.
    - John
    ________________________

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

  3. #3
    Join Date
    Nov 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    understood...
    Thanks for the link. I am going on my investigations.

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
  •