Fixed ajax clickmenu bug
authorSebastian Kurfürst <sebastian.kurfuerst@typo3.org>
Mon, 26 Dec 2005 21:19:45 +0000 (21:19 +0000)
committerSebastian Kurfürst <sebastian.kurfuerst@typo3.org>
Mon, 26 Dec 2005 21:19:45 +0000 (21:19 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@936 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/template.php

index bf6efee..ff5576a 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@
        * changed length of page alias from 20 to 32 characters
        * Fixed bug #2087, introduced by #1078
        * Marked t3lib_ajax as subject to change
+       * Fixed clickmenu bug with ajax
 
 2005-12-25  Dmitry Dulepov  <typo3@accio.lv>
 
index 9728e98..6eab041 100755 (executable)
@@ -1265,10 +1265,12 @@ $str.=$this->docBodyTagBegin().
                        $content.='
                                        // opens the clickmenu, is called from ajax_doRequest
                                function showClickmenu_ajax(t3ajax)     {
-                                       var clickmenu = t3ajax.getElementsByTagName("data")[0].getElementsByTagName("clickmenu")[0];
-                                       var tableData = clickmenu.getElementsByTagName("htmltable")[0].firstChild.data;
-                                       var cmlevel = clickmenu.getElementsByTagName("cmlevel")[0].firstChild.data;
-                                       setLayerObj(tableData,cmlevel);
+                                       if (t3ajax.getElementsByTagName("data")[0])     {
+                                               var clickmenu = t3ajax.getElementsByTagName("data")[0].getElementsByTagName("clickmenu")[0];
+                                               var tableData = clickmenu.getElementsByTagName("htmltable")[0].firstChild.data;
+                                               var cmlevel = clickmenu.getElementsByTagName("cmlevel")[0].firstChild.data;
+                                               setLayerObj(tableData,cmlevel);
+                                       }
                                }
 
                                var GLV_gap=10;