---
title: "Javascript-Error bei TMENU_LAYERS"
url: "https://www.typo3.net/d/13930-javascript-error-bei-tmenu-layers"
source: "typo3.net"
tags: ["TYPO3","Menüs","Frage"]
created: "2004-07-26"
last_reply: "2004-08-05"
replies: 1
solved: false
page: 1
pages: 1
lang: "de"
---

# Javascript-Error bei TMENU_LAYERS

TYPO3 › Menüs · 1 Antwort · gestartet 2004-07-26

## Eröffnungsbeitrag

**xris** · 2004-07-26 · [Beitrag #1](https://www.typo3.net/d/13930-javascript-error-bei-tmenu-layers/1)

Hi-

Typo3 ist ja wirklich sehr nett ud brauchbar, aber irgendwann bekomme ich beim Debuggen noch mal einen Nervenzusammenbruch.. ich hatte ein wunderbares Menue mit TMENU und TMENU_LAYERS schon am laufen .. dann habe ich normal weitergearbeitet und ploetzlich (ja, ich werde wohl irgendetwas geaendert haben) passiert folgendes:

Beim Laden einer Seite kommt direkt (in der Mozilla Javascript Console):

Error: syntax error
Source File: <http://xyz.info/media/scripts/jsfunc.layermenu.js>
Line: 1
Source Code:
<!DOCTYPE html

Error: GLV_curLayerWidth is not defined
Source File: <http://xyz.info/index.php?id=9>
Line: 64

Error: GL_initLayers is not defined
Source File: <http://xyz.info/index.php?id=9>
Line: 165

.. und dann wenn ich die Maus im Browser-Fenster bewege:

Error: GL_getMouse is not defined
Source File: <http://xyz.info/index.php?id=9>
Line: 163

Mir ist bei so etwas immer foellig schleierhaft, wie ich damit umgehen soll- aehnliches ist mir schon ein mal passiert- dann habeich ewig rumprobiert; nichts gefunden; dann Typo3 komplett neu installiert, Setup/Templates komplett neu erstellt (nach bestem wissen und gewissen genauso wie's vorher auch war) und - tada! .. alles funktionierte wieder.. *sigh* .. achja, ist ne aktuelle 3.6.2 Version ..

.. irgendwer' ne idee, wie man da rangehen kann?

---- snip: mein Template Setup ----

```typoscript
# -----------------------------------------------
# INCLUDES
# -----------------------------------------------

page = PAGE

page.typeNum = 0

page.includeLibs.tmenu_layers = media/scripts/tmenu_layers.php
page.config.doctype = xhtml_trans 

# -----------------------------------------------
# Configuring the Auto-Parser:
# -----------------------------------------------

plugin.tx_automaketemplate_pi1 {

    # Read the template file:

  content = FILE

  content.file = fileadmin/template/default.html
 

    # Here we define which elements in the HTML that 

    # should be wrapped in subpart-comments:



  elements {

    BODY.all = 1
    BODY.all.subpartMarker = DOCUMENT_BODY


     HEAD.all = 1
    HEAD.all.subpartMarker = DOCUMENT_HEADER
    HEAD.rmTagSections = title

     TD.all = 1
     DIV.all = 1

  }

 

    # Prefix all relative paths with this value:

  relPathPrefix = fileadmin/template/

}


# -----------------------------------------------
# Menu-Object
# -----------------------------------------------

temp.topnav = HMENU

temp.topnav.1 = TMENU

temp.topnav.1 {

  expAll=1

      NO.allWrap =  <div class="topic"> | </div> 
      ACT = 1
      ACT.allWrap =  <div class="topic"> | </div>  
}

temp.topnav.2 = TMENU_LAYERS

temp.topnav.2 {

  layerStyle = position:absolute;VISIBILITY:hidden; 

  xPosOffset = -30

  lockPosition = x
  #relativeToTriggerItem = 1
  #relativeToTriggerItem.addWidth=1
  #expAll=1

  leftOffset = 15

  #topOffset = -3

      #wrap = <table border="0" bgcolor="#ffffff" cellspacing="0" cellpadding="0"><tr><td> | </td></tr></table>
      NO.allWrap =  <div class="tree"> | </div> 
      ACT = 1
      ACT.allWrap =  <div class="tree"> | </div>  

}


temp.topnav.3 = TMENU

temp.topnav.3 { 

      wrap = <table style="border: solid 1px #b0b0b0; background-color: #f0f0e9;" cellspacing="0" cellpadding="0" ><tr><td> | </td></tr></table>
      NO.allWrap =  <div class="tree"> | </div> 
      ACT = 1
      ACT.allWrap =  <div  class="tree"> | </div>  

}



# -----------------------------------------------
# Main TEMPLATE cObject for the BODY
# -----------------------------------------------

temp.mainTemplate = TEMPLATE

temp.mainTemplate {

    # Feeding the content from the Auto-parser to the TEMPLATE 

  template =< plugin.tx_automaketemplate_pi1

    # Select only the content between the <body>-tags

  workOnSubpart = DOCUMENT_BODY

 

    # Substitute the ###topic### subpart with some example content:

  subparts.topic < temp.topnav
 

    # Substitute the ###content### subpart with some example content:

subparts.content < styles.content.get
}

 
# -----------------------------------------------
# Main TEMPLATE cObject for the HEAD
# -----------------------------------------------

temp.headTemplate = TEMPLATE

temp.headTemplate {

    # Feeding the content from the Auto-parser to the TEMPLATE 

  template =< plugin.tx_automaketemplate_pi1

    # Select only the content between the <head>-tags

  workOnSubpart = DOCUMENT_HEADER
}
 
 
# -----------------------------------------------
# Default PAGE object:
# -----------------------------------------------
 

# Copying the content from TEMPLATE for <body>-section:

page.10 < temp.mainTemplate


# Copying the content from TEMPLATE for <head>-section:

page.headerData.10  < temp.headTemplate
```

## Antworten

### [#2](https://www.typo3.net/d/13930-javascript-error-bei-tmenu-layers/2) · Flink · 2004-08-05

> **xris schrieb:**
>
> Beim Laden einer Seite kommt direkt (in der Mozilla Javascript Console):
>
> Error: syntax error
> Source File: <http://xyz.info/media/scripts/jsfunc.layermenu.js>
> Line: 1
> Source Code:
>
> ```plaintext
> <!DOCTYPE html
> ```

Sieh dir mal diese Datei genau an. Eine js-Datei darf nur reinen JavaScript-Code enthalten. "<!DOCTYPE html" gibt es nur in html-Dateien mit Endung 'htm' oder 'html'.

---

Quelle: „Javascript-Error bei TMENU_LAYERS“, typo3.net, https://www.typo3.net/d/13930-javascript-error-bei-tmenu-layers
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
