View Full Version : incompatibilities

11-23-2005, 11:40 AM
Hi all,

I can not make the Tab Content Script (http://www.dynamicdrive.com/dynamicindex17/tabcontent.htm) works with the CMotion Image Gallery ("http://www.dynamicdrive.com/dynamicindex4/cmotiongallery.htm) or with this script (which does not come from DD :rolleyes: ) :

//The speed of the timeout between each scroll.

//The height of the container (change this when it scrolls to much or to little)

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') ;

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;
var hasInit = false ;
var scrollTim;
var active=0;

function scroll(speed){
if (hasInit){
if((!way && oScroll[active].top()>-oScroll[active].scrollHeight+contHeight) || (oScroll[active].top()<0 && way)){
//Clears the timeout so the scroll stops, this is called onmouseout.

function noScroll(){

function scrollInit(){
oScroll=new Array()
oScroll[0]=new makeScrollObj('content','Pcontent')

hasInit = true ;
Executes the scrollInit function on pageload.

I have looked for a solution by myself but it seems I was a bit too presumptuous... :p

Can anyone help me, please ? :)

11-24-2005, 09:05 AM
This is a stock response:


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


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.

11-24-2005, 09:17 AM
Thanks for the link. I am going on my investigations.