Miałem kiedyś taki skrypt do obsługi zakładek. Pokazywałem go nawet na forum. Teraz dodałem do jednej strony swój skrypt oraz bibliotekę mootools i zrobiło się nieprzyjemnie worriedsmiley.gif Oto mój kod:
  1. <?php
  2. var Edicra;
  3. if (!Edicra) Edicra = {};
  4.  
  5. Edicra.TabbedPanel = function(element, tabId)
  6. {
  7.    this.startingTab = tabId;
  8.    this.currentTab = this.startingTab;
  9.    this.element2 = document.getElementById(element);
  10.    allChildren = this.getElementChildren(this.element2);
  11.    this.tabs = this.getElementChildren(allChildren[0]);
  12.    this.panels = this.getElementChildren(allChildren[1]);
  13.    for (var i in this.tabs) {
  14.        if (i == this.startingTab) {
  15.            this.tabs[i].className = 'selected';
  16.        } else {
  17.            if (i == this.currentTab) {
  18.                this.panels[i].style.display = 'block';
  19.            } else {
  20.                this.panels[i].style.display = 'none';
  21.            }
  22.        }
  23.    }
  24. }
  25.  
  26. (..)
  27.  
  28. Edicra.TabbedPanel.prototype.getElementChildren = function(element)
  29. {
  30.    var children = [];
  31.    var child = element.firstChild;
  32.    while (child) {
  33.        if (child.nodeType == 1 /* Node.ELEMENT_NODE */)
  34.            children.push(child);
  35.        child = child.nextSibling;
  36.    }
  37.    return children;
  38. };
  39. ?>


Przeglądarka wyświetla bład: this.tabs[i] is not an object. Po wuunięciu mootoolsa wszystko działa OK. Moze ktoś się z czymś takim spotkał. Błagam o pomoc.