Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:14

not sure


Poster: apocalypse
Dated: Wednesday February 15 2006 - 7:40:04 GMT

ok, i was cruising around, and found some code on the net, that i really do like. im not the greatest code slinger as you all will soon see, but this is an irksome problem that i cannot seem to solve.

problem: firefox will not recognize menus. IE and mozilla will however. just not FF.

here is what i have (lotsa code comin up!!) it is on an invision powerboard, so the global html headers are NOT supposed to be in the page code *fyi* its not neccicary. anyway, here is the page code, and following are the 2 js files that are currently being used. ive put alot of time into this and dont really want to start again, but if i can solve it one way or the other (and keep my happy js flashy menu, id be real happy!)

page code
Code:
<!--ipb.javascript.start-->
<script type="text/javascript">
<!--
var ipb_var_st      = "{ipb.input['st']}";
var ipb_lang_tpl_q1  = "{ipb.lang['tpl_q1']}";
var ipb_var_s        = "{ipb.session_id}";
var ipb_var_phpext  = "{ipb.vars['php_ext']}";
var ipb_var_base_url = "{ipb.script_url}";
var ipb_input_f      = "{ipb.input['f']}";
var ipb_input_t      = "{ipb.input['t']}";
var ipb_input_p      = "{ipb.input['p']}";
var ipb_var_cookieid = "{ipb.vars['cookie_id']}";
var ipb_var_cookie_domain = "{ipb.vars['cookie_domain']}";
var ipb_var_cookie_path  = "{ipb.vars['cookie_path']}";
//-->
</script>
<script type="text/javascript" src='jscripts/ipb_global.js'></script>
<script type="text/javascript" src='jscripts/rollovers.js'></script>
<script type="text/javascript">
<!--
JSFX.Rollover("forum",    "{ipb.vars['img_url']}/forum_over.gif");
JSFX.Rollover("usercp",    "{ipb.vars['img_url']}/usercp_over.gif");
JSFX.Rollover("register",    "{ipb.vars['img_url']}/register_over.gif");
JSFX.Rollover("faq",    "{ipb.vars['img_url']}/faq_over.gif");
JSFX.Rollover("members",    "{ipb.vars['img_url']}/members_over.gif");
JSFX.Rollover("calendar",    "{ipb.vars['img_url']}/calendar_over.gif");
JSFX.Rollover("main",    "{ipb.vars['img_url']}/main_over.gif");
JSFX.Rollover("search",    "{ipb.vars['img_url']}/search_over.gif");
JSFX.Rollover("links",    "{ipb.vars['img_url']}/links_over.gif");
JSFX.Rollover("new",    "{ipb.vars['img_url']}/new_posts_over.gif");
//-->
</script>
<!--ipb.javascript.end-->

<div class="borderwrap">
  <div id="logostrip"><a href='{ipb.script_url}'> </a></div>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-image: url(style_images/<#IMG_DIR#>/nav_buttons_bg.gif)">
  <tr>
  <td style="padding: 0;">
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td align="left" valign="top" style="background-image: url(style_images/<#IMG_DIR#>/forum.gif); padding: 0;">
<a href="{ipb.script_url}act=idx" onMouseOver="JSFX.fadeIn('forum')" onMouseOut="JSFX.fadeOut('forum')">
<img name="forum" class="imgFader" src="{ipb.vars['img_url']}/forum.gif" alt="" height="35" width="75" border="0" /></a></td>


<if="ipb.member['id']">
      <td id="navbar_usercptools" align="left" valign="top" style="background-image: url(style_images/<#IMG_DIR#>/usercp.gif); padding: 0;"><a href="{ipb.script_url}act=UserCP&amp;CODE=00" onMouseOver="JSFX.fadeIn('usercp')" onMouseOut="JSFX.fadeOut('usercp')">
<img name="usercp" class="imgFader" src="{ipb.vars['img_url']}/usercp.gif" alt="" height="35" width="75" border="0" /></a>
<script type="text/javascript"> vbmenu_register("navbar_usercptools"); </script>
<div id="navbar_usercptools_menu" style="display:none">
<div class="borderwrap">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td nowrap="nowrap" bgcolor="#000000" class="thead">
<a href="{ipb.script_url}act=UserCP&amp;CODE=00">User Control Panel</a>&nbsp;&nbsp;</td></tr>
<tr><td class="vbmenu_option"><a href="{ipb.script_url}act=UserCP&CODE=01">Edit Profile</a></td></tr>
<tr><td class="vbmenu_option"><a href="{ipb.script_url}act=UserCP&amp;CODE=22">Edit Signature</a></td></tr>
<tr><td class="vbmenu_option"><a href="{ipb.script_url}act=UserCP&amp;CODE=24">Edit Avatar</a></td></tr>
<tr><td class="vbmenu_option"><a href="{ipb.script_url}act=UserCP&amp;CODE=photo">Edit Photo</a></td></tr>
<tr><td class="vbmenu_option"><a href="{ipb.script_url}act=UserCP&amp;CODE=04">Edit Options</a></td></tr>
<tr><td class="vbmenu_option"><a href="{ipb.script_url}act=Msg&CODE=01&VID=in">Check Messages</a></td></tr>
<tr><td class="vbmenu_option"><a href="{ipb.script_url}act=UserCP&act=Msg&CODE=04">Send PM</a></td></tr>
</table>
</div>
</div>
</td>
</if>
<else>
      <td align="left" valign="top" style="background-image: url(style_images/<#IMG_DIR#>/register.gif); padding: 0;">
     <a href="{ipb.script_url}act=Reg&amp;CODE=00" onMouseOver="JSFX.fadeIn('register')" onMouseOut="JSFX.fadeOut('register')">
     <img name="register" class="imgFader" src="{ipb.vars['img_url']}/register.gif" alt="" height="35" width="75" border="0" /></a></td>
</else>

<td align="left" valign="top" style="background-image: url(style_images/<#IMG_DIR#>/faq.gif); padding: 0;">
<a href="index.php?act=Help" onMouseOver="JSFX.fadeIn('faq')" onMouseOut="JSFX.fadeOut('faq')">

<img name="faq" class="imgFader" src="{ipb.vars['img_url']}/faq.gif" alt="" height="35" width="75" border="0" /></a></td>

<td id="navbar_main" align="left" valign="top" style="background-image: url(style_images/<#IMG_DIR#>/main.gif); padding: 0;">
   <a href="#" onMouseOver="JSFX.fadeIn('main')" onMouseOut="JSFX.fadeOut('main')">
   <img name="main" class="imgFader" src="{ipb.vars['img_url']}/main_over.gif" alt="" height="35" width="75" border="0" /></a>

<script type="text/javascript"> vbmenu_register("navbar_main"); </script>

<div id="navbar_main_menu" style="display:none">
<div class="borderwrap">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td nowrap="nowrap" class="thead" bgcolor="#000000">Site Information</td></tr>
<tr><td class="vbmenu_option"><a href="{ipb.script_url}act=login">Login</a></td></tr>
<tr><td class="vbmenu_option"><a href="">Portal Main</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.ragingalliance.com/404.htm">Downloads</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.ragingalliance.com/404.htm">Image Gallery</a></td></tr>
<tr><td class="vbmenu_option"><a href="{ipb.script_url}act=Stats&CODE=leaders">Moderators</a></td></tr>
<tr><td class="vbmenu_option"><a href="webmaster __at__ ragingalliance.com">Request a link be added</a></td></tr>
</table>
</div>
</div>
</td>

<td align="left" valign="top" style="background-image: url(style_images/<#IMG_DIR#>/members.gif); padding: 0;">
<a href="{ipb.script_url}act=Members" onMouseOver="JSFX.fadeIn('members')" onMouseOut="JSFX.fadeOut('members')">
<img name="members" class="imgFader" src="{ipb.vars['img_url']}/members.gif" alt="" height="35" width="75" border="0" /></a></td>
     
<td align="left" valign="top" style="background-image: url(style_images/<#IMG_DIR#>/calendar.gif); padding: 0;">
<a href="{ipb.script_url}act=calendar" onMouseOver="JSFX.fadeIn('calendar')" onMouseOut="JSFX.fadeOut('calendar')">
<img name="calendar" class="imgFader" src="{ipb.vars['img_url']}/calendar.gif" alt="" height="35" width="75" border="0" /></a></td>

<if="ipb.member['id']">
      <td align="left" valign="top" style="background-image: url(style_images/<#IMG_DIR#>/new_posts.gif); padding: 0;">
     <a href="{ipb.script_url}act=Search&amp;CODE=getnew" onMouseOver="JSFX.fadeIn('new')" onMouseOut="JSFX.fadeOut('new')">
     <img name="new" class="imgFader" src="{ipb.vars['img_url']}/new_posts.gif" alt="" height="35" width="75" border="0" /></a></td>
</if>
      <td id="navbar_search" align="left" valign="top" style="background-image: url(style_images/<#IMG_DIR#>/search.gif); padding: 0;">
<a href="{ipb.script_url}act=Search&amp;f={ipb.input['f']}" onMouseOver="JSFX.fadeIn('search')" onMouseOut="JSFX.fadeOut('search')">
<img name="search" class="imgFader" src="{ipb.vars['img_url']}/search_over.gif" alt="" height="35" width="75" border="0" /></a>
<script type="text/javascript"> vbmenu_register("navbar_search"); </script>
<div id="navbar_search_menu" style="display:none">
<div class="borderwrap">
<table cellpadding="4" cellspacing="1" border="0">

<tr><td nowrap="nowrap" class="thead">Search Forums</td></tr>
<tr>
  <td class="vbmenu_option" title="nohilite" style="padding: 2px">
  <form action="{ipb.script_url}act=Search&amp;CODE=01&amp;forums=all" method="post" name="search">
  <input type="text" name="keywords" value="" size="15" />&nbsp;<input type="submit" value="Go" />
  </form>
  </td>
</tr>
<tr>
  <td class="vbmenu_option"><a href="{ipb.script_url}act=Search&amp;mode=adv">Advanced Search</a></td>
</tr>
</table>
</div>
</div>
</td>
      <td id="navbar_links" align="left" valign="top" style="background-image: url(style_images/<#IMG_DIR#>/links.gif); padding: 0;">
<a href="#" onMouseOver="JSFX.fadeIn('links')" onMouseOut="JSFX.fadeOut('links')"><img name="links" class="imgFader" src="{ipb.vars['img_url']}/xlinks_over.gif" alt="" height="35" width="75" border="0" /></a>
<script type="text/javascript"> vbmenu_register("navbar_links"); </script>
<div id="navbar_links_menu" style="display:none">
<div class="borderwrap">
<table cellpadding="4" cellspacing="1" border="0">
<tr><td nowrap="nowrap" class="thead" bgcolor="#000000">Quick Links</td></tr>
<tr><td class="vbmenu_option"><a href="http://www.battlefield2leagues.com">Battlefield 2 Leagues</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.mechwarriorleagues.com">Mechwarrior Leagues</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.ddo.com">Dungeons and Dragons Online</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.eve-online.com">Eve Online</a></td></tr>
<tr><td class="vbmenu_option"><a href="http://www.ragingalliance.com/admin.php">Administration</a></td></tr>
<tr><td class="vbmenu_option"><a href="webmaster __at__ ragingalliance.com">Request a link be added</a></td></tr>
</table>
</div>
</div>
</td>
    </tr>
    </table> 
  </td>
  <td width="100%" style="padding: 0;">&nbsp;</td>
  </tr>
</table> 
</div>


*vbbulletin_menu.js*
Code:
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.0.3
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000–2004 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| #                      Nullified by WDYL-WTN Team                  # ||
|| #################################################################### ||
\*======================================================================*/

var vbmenu_usepopups = true;
var vbmenu_registered = new Array();
var vbmenu_initialized = new Array();
var vbmenu_activemenus = new Array();
var vbmenu_currentactive = false;
var slidetimer = false;
var vbmenu_opensteps = 10;
var vbmenu_doslide = true;
var vbmenu_dofade = false; // can be very slow

var vbmenu_datefields = new Array();

// #############################################################################
// another function to handle the different event models of different browsers
// and prevent event bubbling in a lesser way
function e_by_gum(eventobj)
{
   if (!eventobj || is_ie)
   {
      window.event.cancelBubble = true;
      return window.event;
   }
   else
   {
      if (eventobj.target.type == 'submit')
      {
         // naughty safari
         eventobj.target.form.submit();
      }
      eventobj.stopPropagation();
      return eventobj;
   }
}

// #############################################################################
// get left position of elm
function fetch_object_posleft(elm)
{
   var left = elm.offsetLeft;
   while((elm = elm.offsetParent) != null)
   {
      left += elm.offsetLeft;
   }
   return left;
}

// #############################################################################
// get top position of elm
function fetch_object_postop(elm)
{
   var top = elm.offsetTop;
   while((elm = elm.offsetParent) != null)
   {
      top += elm.offsetTop;
   }
   return top;
}

// #############################################################################
function vbmenu_doregister(controlid, nowrite, datefield)
{
   if (document.getElementsByTagName)
   {
      var controlobj = fetch_object(controlid);
      if (controlobj)
      {         
         if (datefield)
         {
            vbmenu_datefields[controlid] = datefield;
         }
         
         vbmenu_registered[vbmenu_registered.length] = controlid;
         
         if (!nowrite)
         {
            //document.write('<img src="jscripts/menu_open.gif" alt="" border="0" />');
         }
         return true;
      }
   }
   
   return false;
}

// #############################################################################
// function to get the menu basename - 'menu.104' returns 'menu', 'x.menu' returns 'x'
function vbmenu_getmenuid(controlid)
{
   var dotpos = controlid.indexOf(".");
   if (dotpos != -1)
   {
      return controlid.substr(0, dotpos);
   }
   else
   {
      return controlid;
   }
}

// #############################################################################
// handle menu control mouseover events
function vbmenu_eventhandler_mouseover(e)
{
   e = do_an_e(e);
   vbmenu_hover(this);
}

// #############################################################################
// handle menu control click events
function vbmenu_eventhandler_click(e)
{
   e = do_an_e(e);
   vbmenu_open(this);
}

// #############################################################################
// close all open menus
function vbmenu_close()
{
   if (vbmenu_currentactive)
   {
      for (key in vbmenu_activemenus)
      {
         fetch_object(vbmenu_getmenuid(key) + "_menu").style.display = "none";
         vbmenu_activemenus[key] = false;
      }
   }
   vbmenu_currentactive = false;
   
   if (slidetimer)
   {
      clearTimeout(slidetimer);
      slidetimer = false;
   }
   
   if (is_ie)
   {
      selects = document.getElementsByTagName("select");
      for (var i = 0; i < selects.length; i++)
      {
         selects[i].style.visibility = "visible";
      }
   }
}

// #############################################################################
// open menu under pointer if another menu is active
function vbmenu_hover(elm)
{
   for (key in vbmenu_activemenus)
   {
      if (vbmenu_activemenus[key] == true && key != elm.id)
      {
         vbmenu_open(elm);
         return;
      }
   }
}

// #############################################################################
// detect if selectobj overlaps m
function vbmenu_overlap(selectobj, m)
{
   s = new Array();
   s['L'] = fetch_object_posleft(selectobj);
   s['T'] = fetch_object_postop(selectobj);   
   s['R'] = s['L'] + selectobj.offsetWidth;
   s['B'] = s['T'] + selectobj.offsetHeight;
   
   if (s['L'] >= m['L'] && s['L'] <= m['R'] && ((s['T'] >= m['T'] && s['T'] <= m['B']) || (s['B'] >= m['T'] && s['B'] <= m['B']))) { return true; }
   else if (s['R'] >= m['L'] && s['R'] <= m['R'] && ((s['T'] >= m['T'] && s['T'] <= m['B']) || (s['B'] >= m['T'] && s['B'] <= m['B']))) { return true; }
   else if (s['B'] >= m['T'] && s['T'] <= m['B'] && ((s['L'] >= m['L'] && s['L'] <= m['R']) || (s['R'] >= m['R'] && s['R'] <= m['R']))) { return true; }
   else if (m['B'] >= s['T'] && m['T'] <= s['B'] && ((m['L'] >= s['L'] && m['L'] <= s['R']) || (m['R'] >= s['R'] && m['R'] <= s['R']))) { return true; }
   else { return false; }
}

// #############################################################################
// open the clicked menu
function vbmenu_open(elm)
{
   var openmenu = vbmenu_currentactive;
   
   vbmenu_close();
   
   if (openmenu == elm.id)
   {
      // clicked element was the control for the currently open menu - exit
      return false;
   }
   
   // get the id of the menu to be opened
   var menuid = vbmenu_getmenuid(elm.id) + "_menu";   
   var menuobj = fetch_object(menuid);
   var force_right_slide = false;

   if (typeof(vbmenu_datefields[elm.id]) != "undefined")
   {
      force_right_slide = true;
      fetch_object(elm.id + "_output").innerHTML = fetch_object(vbmenu_datefields[elm.id]).value;
   }
   else
   {
      force_right_slide = false
   }
   
   vbmenu_activemenus[elm.id] = true;
   vbmenu_currentactive = elm.id;
   
   // get menu position
   var leftpx = fetch_object_posleft(elm);
   var toppx = fetch_object_postop(elm) + elm.offsetHeight;
   
   // un-hide menu   
   menuobj.style.display = "";
   var slidedir = 'left';

   // attempt to keep menu on screen
   if (force_right_slide || (leftpx + menuobj.offsetWidth) >= document.body.clientWidth)
   {
      leftpx = leftpx + elm.offsetWidth - menuobj.offsetWidth;
      slidedir = "right";
   }
   else
   {
      slidedir = "left";
   }

   // shuffle the IE menus a bit
   if (is_ie)
   {
      leftpx += (slidedir == "left") ? -2 : 2;
   }
   
   // set menu position
   menuobj.style.left = leftpx + "px";
   menuobj.style.top = toppx + "px";
   
   if (is_ie)
   {   
      menuarea = {
         "L" : leftpx,
         "T" : toppx,
         "R" : leftpx + menuobj.offsetWidth,
         "B" : toppx + menuobj.offsetHeight
      };      
      selects = document.getElementsByTagName("select");
      for (var i = 0; i < selects.length; i++)
      {
         if (vbmenu_overlap(selects[i], menuarea))
         {
            selects[i].style.visibility = "hidden";
         }
      }
   }

   // slide menus open (internet explorer only)
   if (vbmenu_doslide && !is_opera && !is_ie4)
   {
      if (vbmenu_dofade && is_ie)
      {
         menuobj.filters.item('DXImageTransform.Microsoft.alpha').opacity = 0;
      }
      
      var intervalX = Math.ceil(menuobj.offsetWidth / vbmenu_opensteps);
      var intervalY = Math.ceil(menuobj.offsetHeight / vbmenu_opensteps);
      
      if (slidedir == "left")
      {
         menuobj.style.clip = "rect(auto, 0px, 0px, auto)";
         vbmenu_slide_left(menuid, intervalX, intervalY, 0, 0, 0);
      }
      else
      {
         menuobj.style.clip = "rect(auto, auto, 0px, " + (menuobj.offsetWidth) + "px)";
         vbmenu_slide_right(menuid, intervalX, intervalY, menuobj.offsetWidth, 0, 0);
      }
   }
   
   return false;
}

// #############################################################################
// internet explorer slide menu open left
function vbmenu_slide_left(menuid, intervalX, intervalY, clipX, clipY, opacity)
{
   var menuobj = fetch_object(menuid);
   
   if (clipX < menuobj.offsetWidth || clipY < menuobj.offsetHeight)
   {
      if (vbmenu_dofade && is_ie)
      {
         opacity += 10;
         menuobj.filters.item('DXImageTransform.Microsoft.alpha').opacity = opacity;
      }
      clipX += intervalX;
      clipY += intervalY;
      menuobj.style.clip = "rect(auto, " + clipX + "px, " + clipY + "px, auto)";
      slidetimer = setTimeout("vbmenu_slide_left('" + menuid + "', " + intervalX + ", " + intervalY + ", " + clipX + ", " + clipY + ", " + opacity + ");", 0);
   }
   else
   {
      clearTimeout(slidetimer);
   }
}

// #############################################################################
// internet explorer slide menu open right
function vbmenu_slide_right(menuid, intervalX, intervalY, clipX, clipY, opacity)
{
   menuobj = fetch_object(menuid);
   
   if (clipX > 0 || clipY < menuobj.offsetHeight)
   {
      if (vbmenu_dofade && is_ie)
      {
         opacity += 10;
         menuobj.filters.item('DXImageTransform.Microsoft.alpha').opacity = opacity;
      }
      clipX -= intervalX;
      clipY += intervalY;
      menuobj.style.clip = "rect(auto, " + menuobj.offsetWidth + "px, " + clipY + "px, " + clipX + "px)";
      slidetimer = setTimeout("vbmenu_slide_right('" + menuid + "', " + intervalX + ", " + intervalY + ", " + clipX + ", " + clipY + ", " + opacity + ");", 0);
   }
   else
   {
      clearTimeout(slidetimer);
   }
}

// #############################################################################
// function to navigate to the href of the first found <a> tag
function vbmenu_navtolink(e)
{
   childLinks = this.getElementsByTagName("a");
   if (childLinks[0])
   {
      if (is_ie)
      {
         // use this in IE to send HTTP_REFERER
         childLinks[0].click();
         window.event.cancelBubble = true;
      }
      else
      {
         // other browsers can use this
         if (e.shiftKey)
         {
            window.open(childLinks[0].href);
            e.stopPropagation();
            e.preventDefault();
         }
         else
         {
            window.location = childLinks[0].href;
            e.stopPropagation();
            e.preventDefault();
         }
      }
   }
}

// #############################################################################
// function to toggle the background class of a menu option
function vbmenu_switch_option_bg(e)
{
   if (is_moz)
   {
      moz_rclick(e);
   }
   this.className = (this.className == "vbmenu_option") ? "vbmenu_hilite" : "vbmenu_option";
   vbmenu_hand_pointer(this);
}

// #############################################################################
// function to set the cursor to be pointer/hand
function vbmenu_hand_pointer(obj)
{
   try
   {
      obj.style.cursor = "pointer";
   }
   catch(e)
   {
      obj.style.cursor = "hand";
   }
}

// #############################################################################
// function to initialize a single menu entry
function vbmenu_init(controlid)
{
   var menuid = vbmenu_getmenuid(controlid) + "_menu";
   var menuobj = fetch_object(menuid);
   
   if (document.getElementsByTagName && menuobj)
   {
      // do control object
      var controlobj = fetch_object(controlid);
      vbmenu_hand_pointer(controlobj);
      controlobj.unselectable = true;
      controlobj.onclick = vbmenu_eventhandler_click;
      controlobj.onmouseover = vbmenu_eventhandler_mouseover;
      
      // don't initialize the same popup menu twice
      if (typeof(vbmenu_initialized[menuid]) != "undefined")
      {
         return;
      }
      
      // do popup menu object
      var popupobj = fetch_object(menuid);
      popupobj.style.display = "none";
      popupobj.style.position = "absolute";
      popupobj.style.left = "0px";
      popupobj.style.top = "0px";
      popupobj.onclick = e_by_gum;
      
      // reset inner table width
      var tables = popupobj.getElementsByTagName("table");
      if (tables.length > 0)
      {
         tables[0].width = "";
      }
      
      // init popup filters (ie only)
      if (is_ie)
      {      
         popupobj.style.filter += "progid:DXImageTransform.Microsoft.alpha(enabled=1,opacity=100)";
         popupobj.style.filter += "progid:DXImageTransform.Microsoft.shadow(direction=135,color=#8E8E8E,strength=3)";
      }
      
      // do menu options
      var tds = popupobj.getElementsByTagName("td");
      for (var i = 0; i < tds.length; i++)
      {         
         if (tds[i].className == "vbmenu_option")
         {
            tds[i].style.cursor = "default";
            if (tds[i].title == "nohilite")
            {
               tds[i].title = "";
            }
            else
            {
               tds[i].onmouseover = vbmenu_switch_option_bg;
               tds[i].onmouseout = vbmenu_switch_option_bg;
               tds[i].onclick = vbmenu_navtolink;

               if (!is_saf && !is_kon)
               {
                  try
                  {
                     var links = tds[i].getElementsByTagName("a");
                     for (var j = 0; j < links.length; j++)
                     {
                        if (typeof(links[j].onclick) == "undefined")
                        {
                           links[j].onclick = e_by_gum;
                        }
                     }
                  }
                  catch(e)
                  {
                     // hmm
                  }
               }
            }
         }
         else if (is_moz)
         {
            tds[i].onmouseover = moz_rclick;
            tds[i].onmouseout = moz_rclick;
         }
      }
      
      vbmenu_initialized[menuid] = true;
   }
}

function returnfalse()
{
   return false;
}

function moz_rclick(e)
{
   if (e.type == 'mouseover')
   {
      document.onclick = '';
   }
   else
   {
      document.onclick = vbmenu_close;
   }
}


vbulletin_global.js:

Code:
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.0.3
|| # ---------------------------------------------------------------- # ||
|| # Copyright ©2000–2004 Jelsoft Enterprises Ltd. All Rights Reserved. ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| #################################################################### ||
\*======================================================================*/

// define a few variables that are required
var vbmenu_usepopups = false;
var ignorequotechars = 0;

// #############################################################################
// lets define the browser we have instead of multiple calls throughout the file
var userAgent = navigator.userAgent.toLowerCase();
var is_opera  = (userAgent.indexOf('opera') != -1);
var is_saf    = ((userAgent.indexOf('applewebkit') != -1) || (navigator.vendor == "Apple Computer, Inc."));
var is_webtv  = (userAgent.indexOf('webtv') != -1);
var is_ie     = ((userAgent.indexOf('msie') != -1) && (!is_opera) && (!is_saf) && (!is_webtv));
var is_ie4    = ((is_ie) && (userAgent.indexOf("msie 4.") != -1));
var is_moz    = ((navigator.product == 'Gecko') && (!is_saf));
var is_kon    = (userAgent.indexOf('konqueror') != -1);
var is_ns     = ((userAgent.indexOf('compatible') == -1) && (userAgent.indexOf('mozilla') != -1) && (!is_opera) && (!is_webtv) && (!is_saf));
var is_ns4    = ((is_ns) && (parseInt(navigator.appVersion) == 4));

// catch possible bugs with WebTV and other older browsers
var is_regexp = (window.RegExp) ? true : false;

// #############################################################################
// let's find out what DOM functions we can use
var vbDOMtype = '';
if (document.getElementById)
{
   vbDOMtype = "std";
}
else if (document.all)
{
   vbDOMtype = "ie4";
}
else if (document.layers)
{
   vbDOMtype = "ns4";
}

// make an array to store cached locations of objects called by fetch_object
var vBobjects = new Array();

// #############################################################################
// function to emulate document.getElementById
function fetch_object(idname, forcefetch)
{
   if (forcefetch || typeof(vBobjects[idname]) == "undefined")
   {
      switch (vbDOMtype)
      {
         case "std":
         {
            vBobjects[idname] = document.getElementById(idname);
         }
         break;

         case "ie4":
         {
            vBobjects[idname] = document.all[idname];
         }
         break;

         case "ns4":
         {
            vBobjects[idname] = document.layers[idname];
         }
         break;
      }
   }
   return vBobjects[idname];
}

// #############################################################################
// function to handle the different event models of different browsers
// and prevent event bubbling
function do_an_e(eventobj)
{
   if (!eventobj || is_ie)
   {
      window.event.returnValue = false;
      window.event.cancelBubble = true;
      return window.event;
   }
   else
   {
      eventobj.stopPropagation();
      eventobj.preventDefault();
      return eventobj;
   }
}

// #############################################################################
// function to register a menu for later initialization
function vbmenu_register(controlid, nowrite, datefield)
{
   if (vbmenu_usepopups)
   {
      vbmenu_doregister(controlid, nowrite, datefield);
   }
}

// #############################################################################
// ############## Main vBulletin Javascript Initialization #####################
// #############################################################################

function vBulletin_init()
{
   if (is_webtv)
   {
      return true;
   }
   var imgs = null;
   switch (vbDOMtype)
   {
      case "std": imgs = document.getElementsByTagName("img"); break;
      case "ie4": imgs = document.all.tags("img");             break;
      default:    imgs = false;                                break;
   }
   if (imgs)
   {
      // set 'title' tags for image elements
      for (var i = 0; i < imgs.length; i++)
      {
         if (!imgs[i].title && imgs[i].alt != "")
         {
            imgs[i].title = imgs[i].alt;
         }
      }
   }

   // init registered menus
   if (vbmenu_usepopups && vbmenu_registered.length > 0)
   {
      for (i in vbmenu_registered)
      {
         vbmenu_init(vbmenu_registered[i]);
      }

      // close all menus on mouse click
      document.onclick = vbmenu_close;
   }
   
   return true;
}


i know its alot to ask to go through, so if there is an easy fix let me know, or if i should just start again... let me know :P

help! :cry:


Poster: Migru
Dated: Wednesday February 15 2006 - 7:58:01 GMT

Hi

I´m not sure either

this is a
Help & Support forum for MILONIC DHTML Menu Version 5+


Michael


Poster: apocalypse
Dated: Wednesday February 15 2006 - 13:58:54 GMT

well, is there a way to make all the work i have done move into these menus? ive looked over the product, and its not quite what i have here... but like i said, im not much of a codeslinger.


Poster: John
Dated: Wednesday February 15 2006 - 14:16:17 GMT

Obviously there is no way we can help you with a product other than our own, nor do we have the time to see if our product will work in your situation (unless you can find one of our users willing to tackle it).

However, you are certainly welcome to download a trial copy of our system and see if it will do what you need. At that point, if you have problems with our code, we would be more than willing to help.