Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Rogério Luiz Sarmento on Dec 03, 2008 05:04
open dhtmlx forum
Problems with dhtmlxmenu in Firefox

Excuse my English is bad.
Please help me
I'm using dhtmlxmenu, in IE works correctly, but in FireFox submenus are out of position.
Thank you
Answer posted by Support on Dec 03, 2008 07:00
Could you please provide any demo/sample/source code?
Answer posted by Rogério on Dec 03, 2008 10:06

<link rel="STYLESHEET" type="text/css" href="codebase/dhtmlxmenu.css">
<script language="JavaScript" src="codebase/dhtmlxprotobar.js"></script>
<script language="JavaScript" src="codebase/dhtmlxmenubar.js"></script>
<script language="JavaScript" src="codebase/dhtmlxcommon.js"></script>

<?php

// Menu Personalizado

$query  = "select count(rid) from rmod where length(rseq)=1";
$result  = pg_query("$query");
$line = pg_fetch_row($result);
$trm = $line[0];

// Montando Menu

$query  = "select rmod,rseq,rid,rpro,text_id,rorder from rmod order by 6";
$result  = pg_query("$query");
$wnivel = 3;

echo "<div id='menu_zone' style='position: absolute; top:77; left:0; width:1024; height:50;'/>";
echo "</div>";


echo "<script>";
echo "aMenuBar=new dhtmlXMenuBarObject('menu_zone','100%',30,'4R Solutions');";

while ($line = pg_fetch_row($result))
{
      // Calculo de Submenus
     
       $wnivel = strlen(trim($line[1]));

       $nivel = substr($line[1],0,1);

       $query2   = "select count(rid) from rmod where substring(rseq,1,1)='$nivel' and length(rseq)>'2' and length(rseq)<'5' ";
       $result2  = pg_query("$query2");
       $line2    = pg_fetch_row($result2);
       $mtrs     = $line2[0];

     $query2   = "select count(rid) from rmod where length(rseq)>'$wnivel' and substring(rseq,1,$wnivel) = substring('$line[1]',1,$wnivel)";
      $result2  = pg_query("$query2");
      $line2    = pg_fetch_row($result2);
  
    $titulo   = trim($line[0]);
    $programa = rtrim($line[3]);
    $cont     = rtrim($line[1]);
    $trs      = 0;
    $xprog    = $line[2];
       
    $query3   = "select races from rdir where ruse = '$xid' and rprog = '$xprog'" ;
    $result3  = pg_query("$query3");
    $line3    = pg_fetch_row($result3);
      
       $xaces = $line3[0];
       $xyz = $line[4];
       if (strlen(trim($line[1]))=="1") {
             echo "var item = new dhtmlXMenuItemObject('".$line[4]."','".$titulo."','');";
             echo "aMenuBar.addItem(aMenuBar,item);";
             echo "var subMenu = new dhtmlXMenuBarPanelObject(aMenuBar,item,false,120,true);";
              if ($xaces=="N") {
               echo "aMenuBar.hideItem('$xyz');";
            }
          }
          else
          {
            echo "var item = new dhtmlXMenuItemObject('".$line[4]."','".$titulo."','',null,null,null,'$programa?xid=$xid&xprog=$xprog','_blank');";
            echo "aMenuBar.addItem(subMenu,item);";
            if ($xaces=="N") {
               echo "aMenuBar.hideItem('$xyz');";
            }
          }
}

echo "</script>";

?>

Answer posted by Support on Dec 04, 2008 04:18
Please try to add next line to the init of menu.

echo "aMenuBar=new dhtmlXMenuBarObject('menu_zone','100%',30,'4R Solutions');";
echo "aMenuBar.disableSmartPositioning(true);";
Answer posted by Rogério on Dec 04, 2008 10:03
Thanks, worked correctly