Fly in Menu item : Menu « GUI Components « JavaScript DHTML






Fly in Menu item


<HTML>
<BODY>
<style REL="stylesheet" TYPE="text/css">
A.menu
  { font-family:Arial,Helvetica; font-weight:bold; color:green; text-decoration:underline; }
A.menu:hover
  { font-family:Arial,Helvetica; font-weight:bold; background-color:pink; }
A.menu:visited, A.menu:active
  { font-family:Arial,Helvetica; font-weight:bold; color:green; }
A.submenu
  { font-family:Arial,Helvetica; color:green; }
A.submenu:hover
  { font-family:Arial,Helvetica; background-color:pink; }
A.submenu:visited, A.submenu:active
  { font-family:Arial,Helvetica; color:green; }

</style>
<script type="text/javascript" language="JavaScript">
// JS-Menu 0.5.1 by Vitaly Polonetsky (faqer@topxioft.com)


//  ####################    SIZE / PLACE  CONFIGURATION    ####################
right_sided=0;                                      // Right sided (0-no,1-yes)
one_open_menu=0;                           // Show only one open menu at a time

right_side_margin=10;                               // HTML page's right margin
page_width=140;                                            // HTML page's width
top_menu=20;                             // Top location of the first main menu
left_main_menu=10;                               // Left location of main menus
left_sub_menu=20;                                 // Left location of sub menus
top_after_sub_menu=25;                          // Skip N pixels after sub menu
top_before_sub_menus=25;                       // Skip N pixels after main menu
top_after_sub_menus=30;                       // Skip N pixels before main menu

//  ####################    MENU  AMOUNT  CONFIGURATION    ####################
menu_len=4;                                               // Num. of main menus

var menucount;
menucount=new Array(menu_len+1);
menucount[0]=menu_len;
menucount[1]=2;                     // Num. of sub menus in the first main menu
menucount[2]=1;
menucount[3]=0;
menucount[4]=0;

var menu;
menu=new Array(menucount[0]+1);
for(i=1;i<=menucount[0];i++)
  menu[i] = new Array(menucount[i]+1);
menu[0]=new Array(menucount[0]+1);

//  #####################    MENU  TEXT  CONFIGURATION    #####################
menu[1][0]='SubMenu1';
menu[1][1]='Item1';
menu[1][2]='Item2';
menu[2][0]='SubMenu2';
menu[2][1]='Item';
menu[3][0]='<A HREF="http://www.topixoft.com/">SingleItem1</A>';
menu[4][0]='SingleItem2';

// Public Variables
var timerevent=0;
var can_redraw=0;
//var net_ie=netscape_ie();
//var net6=netscape6();

    var agt=navigator.userAgent.toLowerCase();

    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav2 = (is_nav && (is_major == 2));
    var is_nav3 = (is_nav && (is_major == 3));
    var is_nav4 = (is_nav && (is_major == 4));
    var is_nav4up = (is_nav && (is_major >= 4));
    var is_navonly      = (is_nav && ((agt.indexOf(";nav") != -1) ||
                          (agt.indexOf("; nav") != -1)) );
    var is_nav6 = (is_nav && (is_major == 5));
    var is_nav6up = (is_nav && (is_major >= 5));
    var is_gecko = (agt.indexOf('gecko') != -1);

    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5")==-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);

BuildMenu();
setTimeout('RedrawMenu();',500);


// ############################################################################


function RedrawMenu(menuindex)
{
  var layer_top=top_menu;
  var x1,y1;
  for(i=1;i<=menucount[0];i++)
  {
    if(menu[0][i]+''=='undefined')
    {
      menu[0][i]=-1;
      is_nav4?
      document.layers['menu'+i].top=top_menu+((i-1)/2)*((i-1)/2)*100:
      is_ie4?
      document.all('menu'+i).style.top=top_menu+(((i-1)/2)*((i-1)/2))*100:
      document.getElementById('menu'+i).style.top=top_menu+(((i-1)/2)*((i-1)/2))*100;
      if(!right_sided)
      {
        is_nav4?
        document.layers['menu'+i].left=-page_width:
  is_ie4?
        document.all('menu'+i).style.left=-page_width:  
        document.getElementById('menu'+i).style.left=-page_width;
      }
      else
      {
        is_nav4?
        document.layers['menu'+i].left=page_width:
  is_ie4?
        document.all('menu'+i).style.left=page_width:
        document.getElementById('menu'+i).style.left=page_width;
      }
      is_nav4?
      document.layers['menu'+i].visibility='show':
      is_ie4?
      document.all('menu'+i).style.visibility='visible':
      document.getElementById('menu'+i).style.visibility='visible';
      MoveLayer('menu'+i,left_main_menu,layer_top);
    }
    else
    {
      // SUB menus
      if((menu[0][i]==1)&&(!one_open_menu||can_redraw==1))
      {
        layer_top+=top_before_sub_menus;
        sub_menu_top=layer_top;
        add_top=top_before_sub_menus;
        for(j=1;j<=menucount[i];j++)
        {
          // SUB MENU LAYER HEADER
          if(is_nav4)
            document.layers['menu'+i+'submenu'+j].top=layer_top;
          else
            if(menuindex==i)
              is_ie4?
        document.all('menu'+i+'submenu'+j).style.top=layer_top:
        document.getElementById('menu'+i+'submenu'+j).style.top=layer_top;

          // SUB MENU LAYER FOOTER      
          if(j<menucount[i])
          {
            layer_top+=top_after_sub_menu;
            add_top+=top_after_sub_menu;
          }
        }

        if(menuindex==i)
        {
          // MOVE MAIN MENUS
          for(temp0=menucount[0];temp0>i;temp0--)
          {
            if(menu[0][temp0]==1)
              for(temp02=menucount[temp0];temp02>0;temp02--)
        {
                MoveLayer('menu'+temp0+'submenu'+temp02,'undefined',is_nav4?document.layers['menu'+temp0+'submenu'+temp02].top+add_top:net6px(is_ie4?document.all('menu'+temp0+'submenu'+temp02).style.top:document.getElementById('menu'+temp0+'submenu'+temp02).style.top)+add_top);
        }
            MoveLayer('menu'+temp0,'undefined',is_nav4?document.layers['menu'+temp0].top+add_top:net6px(is_ie4?document.all('menu'+temp0).style.top:document.getElementById('menu'+temp0).style.top)+add_top);
          }

          // BRING SUB MENUS
          for(j=1;j<=menucount[i];j++)
          {
            is_nav4?
            y2=document.layers['menu'+i+'submenu'+j].top:
            y2=net6px(is_ie4?document.all('menu'+i+'submenu'+j).style.top:document.getElementById('menu'+i+'submenu'+j).style.top);
            is_nav4?
            document.layers['menu'+i+'submenu'+j].top=sub_menu_top+((j-1)/2)*((j-1)/2)*100:
      is_ie4?
            document.all('menu'+i+'submenu'+j).style.top=sub_menu_top+(((j-1)/2)*((j-1)/2))*100:
            document.getElementById('menu'+i+'submenu'+j).style.top=sub_menu_top+(((j-1)/2)*((j-1)/2))*100;
            if(!right_sided)
            {
              is_nav4?
              document.layers['menu'+i+'submenu'+j].left=-page_width:
        is_ie4?
              document.all('menu'+i+'submenu'+j).style.left=-page_width:
              document.getElementById('menu'+i+'submenu'+j).style.left=-page_width;
            }
            else
            {
              is_nav4?
              document.layers['menu'+i+'submenu'+j].left=page_width:
        is_ie4?
              document.all('menu'+i+'submenu'+j).style.left=page_width:
              document.getElementById('menu'+i+'submenu'+j).style.left=page_width;
            }
            is_nav4?
            document.layers['menu'+i+'submenu'+j].visibility='show':
      is_ie4?
            document.all('menu'+i+'submenu'+j).style.visibility='visible':
            document.getElementById('menu'+i+'submenu'+j).style.visibility='visible';
            !right_sided?
            MoveLayer('menu'+i+'submenu'+j,left_sub_menu,y2):
            MoveLayer('menu'+i+'submenu'+j,left_sub_menu-right_side_margin,y2);
          }
        }
      }
      else
      {
        if(!(one_open_menu&&menuindex==i&&menu[0][menuindex]==1))
        if(!(one_open_menu&&menuindex!=i&&menu[0][i]==-1))
        {
          menu[0][i]=-1;
          add_top=-top_before_sub_menus;
          for(j=1;j<=menucount[i];j++)
          {
            if((menuindex==i)||(one_open_menu))
            {
              if(!right_sided)
        {
                is_ie4?
    MoveLayer('menu'+i+'submenu'+j,-page_width,layer_top+top_before_sub_menus+((j-1)/2)*((j-1)/2)*100,"document.all('menu"+i+"submenu"+j+"').style.visibility=\"hidden\";"):
    MoveLayer('menu'+i+'submenu'+j,-page_width,layer_top+top_before_sub_menus+((j-1)/2)*((j-1)/2)*100,"document.getElementById('menu"+i+"submenu"+j+"').style.visibility=\"hidden\";");
        }
        else
        {
                is_ie4?
                MoveLayer('menu'+i+'submenu'+j,page_width,layer_top+top_before_sub_menus+((j-1)/2)*((j-1)/2)*100,"document.all('menu"+i+"submenu"+j+"').style.visibility=\"hidden\";"):
                MoveLayer('menu'+i+'submenu'+j,page_width,layer_top+top_before_sub_menus+((j-1)/2)*((j-1)/2)*100,"document.getElementById('menu"+i+"submenu"+j+"').style.visibility=\"hidden\";");
        }
              if(is_nav4)
                document.layers['menu'+i+'submenu'+j].visibility="hide";
            }

            if(j<menucount[i])
            {
              add_top-=top_after_sub_menu;
            }
          }

          // MOVE MAIN MENUS
          if(menuindex==i||one_open_menu)
            for(temp0=i+1;temp0<=menucount[0];temp0++)
            {
              MoveLayer('menu'+temp0,'undefined',is_nav4?document.layers['menu'+temp0].top+add_top:net6px(is_ie4?document.all('menu'+temp0).style.top:document.getElementById('menu'+temp0).style.top)+add_top);
              if(menu[0][temp0]==1)
                for(temp02=1;temp02<=menucount[temp0];temp02++)
                  MoveLayer('menu'+temp0+'submenu'+temp02,'undefined',is_nav4?document.layers['menu'+temp0+'submenu'+temp02].top+add_top:net6px(is_ie4?document.all('menu'+temp0+'submenu'+temp02).style.top:document.getElementById('menu'+temp0+'submenu'+temp02).style.top)+add_top);
            }
        }
      }
    }
    layer_top+=top_after_sub_menus;
  }

  // OPEN ONE MENU
  if(one_open_menu&&menu[0][menuindex]==1)
  {
    if(can_redraw==1)
      can_redraw=0;
    else
    {
      can_redraw=1;
      timerevent+=10;
      setTimeout('RedrawMenu('+menuindex+'); timerevent-=10;',timerevent);
    }
  }
}

function BuildMenu()
{
  var layer_top=top_menu;
  for(i=1;i<=menucount[0];i++)
  {
    // MAIN MENU LAYER HEADER
    is_nav4?
    document.writeln('<LAYER ID="menu'+i+'" VISIBILITY="hide" TOP='+layer_top+' LEFT='+left_main_menu+' WIDTH='+(page_width-left_main_menu-right_side_margin)+'>'):
    document.writeln('<DIV ID="menu'+i+'" BORDER=1 STYLE="visibility:hidden;position:absolute;top:'+layer_top+'px;left:'+left_main_menu+'px;">');

    if(right_sided)
    {
      is_nav4?
      document.writeln('<DIV ALIGN="right">'):
      document.writeln('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="'+(page_width-left_main_menu-right_side_margin)+'px"><TR><TD ALIGN="right">');
    }

    // MAIN MENU LAYER BODY
    if(menucount[i]>0)
    {
      is_ie4up||is_nav6up?
      document.write('<A HREF="javascript:open_close_sub_menus('+i+');" CLASS="menu" onMouseOver="setTimeout(\'self.status=\\\''+menu[i][0]+'\\\';\',1);" onMouseOut="self.status=\'\';">'):
      document.write('<A HREF="javascript:open_close_sub_menus('+i+');" CLASS="menu" onMouseOver="self.status=\''+menu[i][0]+'\'; return true;" onMouseOut="self.status=\'\'; return true;">');
    }
    document.write(menu[i][0]);
    if(menucount[i]>0)
      document.write('</A>');
    document.writeln();

    // MAIN MENU LAYER FOOTER
    if(right_sided)
    {
      is_nav4?
      document.writeln('</DIV>'):
      document.writeln('</TD></TR></TABLE>');
    }

    is_nav4?
    document.writeln('</LAYER>'):
    document.writeln('</DIV>');

    // SUB MENUS
    for(j=1;j<=menucount[i];j++)
    {
      // SUB MENU LAYER HEADER
      is_nav4?
      document.writeln('<LAYER ID="menu'+i+'submenu'+j+'" VISIBILITY="hide" TOP='+layer_top+' LEFT='+left_sub_menu+' WIDTH='+(page_width-left_sub_menu-right_side_margin)+'>'):
      document.writeln('<DIV ID="menu'+i+'submenu'+j+'" STYLE="visibility:hidden;position:absolute;top:'+layer_top+'px;left:'+left_sub_menu+'px;">');

      if(right_sided)
      {
  is_nav4?
        document.writeln('<DIV ALIGN="right">'):
        document.writeln('<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="'+(page_width-left_sub_menu-right_side_margin)+'px"><TR><TD ALIGN="right">');
      }

      // SUB MENU LAYER BODY
      document.writeln(menu[i][j]+'<BR>');

      // SUB MENU LAYER FOOTER
      if(right_sided)
      {
  is_nav4?
        document.writeln('</DIV>'):
        document.writeln('</TD></TR></TABLE>');
      }

      is_nav4?
      document.writeln('</LAYER>'):
      document.writeln('</DIV>');
    }
    layer_top+=top_after_sub_menus;
  }
}

function MoveLayer(layer_name,left,top,after_move_action)
{
  var dont_move=0;
  index_menu=layer_name.indexOf("menu");
  index_submenu=layer_name.indexOf("submenu");
  name_length=layer_name.length;
  if(index_menu==0)
  {
    if(index_submenu!=-1)
    {
      if(menu[layer_name.substr(index_menu+4,index_submenu-4)][layer_name.substr(index_submenu+7,name_length)]=="")
        dont_move=1;
    }
    else
    {
      if(menu[layer_name.substr(index_menu+4,name_length)][0]=="")
        dont_move=1;
    }
  }
  if(dont_move!=1)
  {
    layer=is_nav4?document.layers[layer_name]:is_ie4?document.all(layer_name):document.getElementById(layer_name);
    x1=is_nav4?document.layers[layer_name].left:eval(is_ie4?document.all(layer_name).style.pixelLeft:document.getElementById(layer_name).style.pixelLeft);
    y1=is_nav4?document.layers[layer_name].top:eval(is_ie4?document.all(layer_name).style.pixelTop:document.getElementById(layer_name).style.pixelTop);
    if(left+''=='undefined')
      left=x1;
    if(top+''=='undefined')
      left=y1;
    // Netscape 6:
    if(x1+''=='undefined')
      x1=net6px(is_ie4?document.all(layer_name).style.left:document.getElementById(layer_name).style.left);
    if(y1+''=='undefined')
      y1=net6px(is_ie4?document.all(layer_name).style.top:document.getElementById(layer_name).style.top);
    x2=left;
    y2=top;
    speed=30;
    if(is_nav4) waitspeed=Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))/110*50;
    for(temp=0;temp<speed;temp++)
    {
      // MOVE ACTION
      if(is_nav4)
      {
        layer.left=x1-(x1-x2)/speed*temp;
        layer.top=y1-(y1-y2)/speed*temp;
        for(temp2=0;temp2<waitspeed*5;temp2++);
      }
      else
      {
        timerevent+=10;
  is_ie4?
        setTimeout('document.all(\''+layer_name+'\').style.left='+(x1-(x1-x2)/speed*temp)+'; document.all(\''+layer_name+'\').style.top='+(y1-(y1-y2)/speed*temp)+'; timerevent-=10;',timerevent):
        setTimeout('document.getElementById(\''+layer_name+'\').style.left='+(x1-(x1-x2)/speed*temp)+'; document.getElementById(\''+layer_name+'\').style.top='+(y1-(y1-y2)/speed*temp)+'; timerevent-=10;',timerevent);
      }
    }

    if(is_nav4)
    {
      layer.left=x2;
      layer.top=y2;
    }
    else
    {
      timerevent+=10;
      is_ie4?
      setTimeout('document.all(\''+layer_name+'\').style.left='+x2+'; document.all(\''+layer_name+'\').style.top='+y2+'; timerevent-=10;',timerevent):
      setTimeout('document.getElementById(\''+layer_name+'\').style.left='+x2+'; document.getElementById(\''+layer_name+'\').style.top='+y2+'; timerevent-=10;',timerevent);

      if(after_move_action)
      {
        timerevent+=10;
        setTimeout(after_move_action+" timerevent-=10;",timerevent);
      }
    }
  }
}

function open_close_sub_menus(menuindex)
{
  timerevent+=10;
  setTimeout("open_close_sub_menus_call("+menuindex+"); timerevent-=10;",timerevent);
}

function open_close_sub_menus_call(menuindex)
{
  menu[0][menuindex]==-1?menu[0][menuindex]=1:menu[0][menuindex]=-1;
  RedrawMenu(menuindex);
}

function net6px(value)
{
  var text=value;
  var length=text.length;
  var retval=text.substr(0,length-2);
  retval=retval*1;
  return retval;
}


/*


    ----  ====  ****  ####          JS-Menu          ####  ****  ====  ----
                                Version:  Beta 0.5.1


Made by FAQer, at August, the 9th and the 10th, 2000.
This script is protected by GNU license.
The license is located at http://www.gnu.org/.
Read the license before using this script in any way.

I take NO RESPONISIBLITY for quality or compatibility of the script below.

Tested on:
 * Mozilla 1.1a                                 on RedHat Linux 7.1    by FAQer
 * Mozilla 1.0                                  on RedHat Linux 7.1    by FAQer
 * Mozilla 1.0 RC3                              on RedHat Linux 7.1    by FAQer
 * Mozilla 1.0 RC2                              on RedHat Linux 7.1    by FAQer
 * Mozilla 1.0 RC1                              on RedHat Linux 7.1    by FAQer
 * Mozilla 0.9.9                                on RedHat Linux 7.1    by FAQer
 * Mozilla 0.9.8                                on RedHat Linux 7.1    by FAQer
 * Mozilla 0.9.7                                on RedHat Linux 7.1    by FAQer
 * Mozilla 0.9.6                                on RedHat Linux 7.1    by FAQer
 * Mozilla 0.9.5                                on RedHat Linux 7.1    by FAQer
 * Mozilla 0.9.4                                on RedHat Linux 7.1    by FAQer
 * Mozilla 0.9.3                                on RedHat Linux 7.1    by FAQer
 * Mozilla 0.9.2                                on RedHat Linux 7.1    by FAQer
 * Mozilla 0.9.2                                on Windows 2000        by FAQer
 * Mozilla 0.9.1                                on Windows 2000        by FAQer
 * Mozilla 0.9                                  on Windows 2000        by FAQer
 * Mozilla 0.8                                  on Windows 2000        by FAQer
 * Mozilla 0.7                                  on Windows 2000        by FAQer
 * Mozilla 0.6                                  on Windows 2000        by FAQer
 * Mozilla 18 (Nightly 12/12/2000)              on RedHat Linux 7.0    by FAQer
 * Netscape Navigator 6.0 (Final Release)       on Windows 2000        by FAQer
 * Netscape Navigator 6.0 (Preview Release 3)   on Windows 2000        by FAQer
 * Microsoft Internet Explorer 6.0              on Windows 98 SE       by FAQer
 * Microsoft Internet Explorer 6.0b (2509)      on Windows XP (2509)   by FAQer
 * Microsoft Internet Explorer 5.0              on Windows 2000        by FAQer
 * Microsoft Internet Explorer 5.0              on Windows 98 SE       by FAQer
 * Microsoft Inetrnet Explorer 5.0              on Windows NT4 (SP6)   by MB
 * Netscape Navigator 4.77                      on RedHat Linux 7.1    by FAQer
 * Netscape Navigator 4.75                      on RedHat Linux 7.0    by FAQer
 * Netscape Navigator 4.74                      on Windows 2000        by FAQer
 * Netscape Navigator 4.7                       on Windows 98 SE       by FAQer
 * Netscape Navigator 4.7                       on RedHat Linux 6.2    by FAQer
 * Netscape Navigator 4.7                       on Solaris 5.0         by FAQer
 * Microsoft Internet Explorer 4.0              on Windows 98          by FAQer
NO WARRANTY GIVEN !!!

Feel free to e-mail me.
FAQer (faqer@topixoft.com), TopiXoft (1999-2002).


###############################################################################
FUTURE (IMPORTANT):

* onUnload - main menus should fly away, too.
* rewrite net6px() and probably remove it
* rewrite the whole thing, because of the many-clicks at onse bugs.
* Put the code in some good sites, such as PlanetSourceCode, etc.
* Support for basic variable names, so that other scripts won't change
  menu settings, by mistake.
  Rename common variables or make them private (if this can be done in JS).
  Make the configuration constants more interactive, with more explanations.
  Or may be, put the configuration in objects.
* May be some CGI support, CGI scripts run better than JS.


###############################################################################
July, the 18th, 2002.
# Beta 0.5.1

Added COPYING.
Took out the readme part to a README file.
Start publishing in SourceForge and Freshmeat.

by FAQer (faqer@topixoft.com) | Done


###############################################################################
February, the 20th, 2002.

There's a bug in Mozilla 0.9.7+ .
I've filed a bugreport about this a few weeks ago.
Today the bugzilla team found out that this was a bug not related to
JavaScript, and the bug happens only when you use frames and do
scrolling="no"

I sould get a few ideas for the menu, to continue to develop it !!!

by FAQer (faqer@topixoft.com) | Noted


###############################################################################
August, the 17th, 2001.
# Beta 0.5.0

Just opened IE4, and the menu didn't work,
added a few lines to support IE4.

A few more improvements in if(a==0) -> if(!a) and stuff...

Added a part of "Ultimate client-side JavaScript client sniff. Version 3.02"
Deleted net_ie() and netscape6()

The script can now be improved as working on all browsers versions >= 4

by FAQer (faqer@topixoft.com) | Done


###############################################################################
November, the 14th, 2000.
# Beta 0.4.4

Fixed a bug in BuildMenu(), that caused menus
not to use CSS because of the status changing in NN6.

by FAQer (faqer@topixoft.com) | Done


###############################################################################
November, the 14th, 2000.
# Beta 0.4.3

Fixed a bug in MoveMenu(), that caused menus
not to come to the right place on IE & NN6.

by FAQer (faqer@topixoft.com) | Done


###############################################################################
November, the 7th, 2000.
# Beta 0.4.2

On Telecom exhibition I've found a Netscape bug,
showing our school's java projects.

THIS WAS THE NETSCAPE BUG.
Finally the menu can be marked as beta-tested,
because ALL of its features work.

Thanks Nasy Ghatani for her help in finding the bug,
and definding it as a bug.  :-)

by FAQer (faqer@topixoft.com) | Done


###############################################################################
October, the 21th, 2000.
# Beta 0.4.1

After 3 days, finally, finished the option
for having only one open (with visible sub menus) menu at a time.

The menu doesn't get screwed up if clicking on the menu
before any move actions are done.

by FAQer (faqer@topixoft.com) | Done


###############################################################################
October, the 19th, 2000.
# Beta 0.4.0

Month after Beta 0.3 was released Beta 0.4 comes,
with full, but not good enought support of Netscape 6 (Mozilla 18).

* document.all() changed to document.getElementById() - IE 5, NN 6, Opera 4
* .style.pixelLeft/Top don't supported by Netscape Navigator 6.0:
   net6px function extracts XXX from 'XXXpx'
* Few 'undefined' bugs, changed to XXX+'' which converts XXX to string.
   Now Netscape Navigator 6.0 can understand this, too.
* Improved browser type check.
* RedrawMenu() in setTimeout(),
   Netscape Navigator 6.0 have to wait a few moments
   before it can use script written <DIV>s.

by FAQer (faqer@topixoft.com) | Done


###############################################################################
October, the 15th, 2000.
# Beta 0.3.1

NN/IE detection now uses variable instead of function:
  This should work faster.

Prepared the file for public use:
* Wrote more understandable descriptions for configuration options
* Changed version number to Beta 0.3.1
* Wrote this Note
* Spell checked
* Checked the script one more time :-)

Netscape Navigator 4.74 bug:
This is a NN problem, when you click on the NN's menu,
while the menu is moving it moves quickly.
Probably when the web-page engine looses focus it works fine.
That explains why the menu moves quickly at the beginning.
I'll contact Netscape for further explanation/fix.

by FAQer (faqer@topixoft.com) | Done


###############################################################################
October, the 4th, 2000.

This was written in FUTURE section:
* Repair Netscape Navigator 4.74 bug - sub menus move slow, really slow.
  I think that the problem is not at the MoveLayer() function.
  The problem should be somewhere in RedrawMenu() function,
  because main menus move fine.

Today I browsed the site and somehow everything was ok,
strange...

by FAQer (faqer@topixoft.com) | Noted


###############################################################################
September, the 19th, 2000.
# Beta 0.3.0

Right-sided languages support.

I live in Israel and I speak hebrew which is right-sided language,
but I thought about this only at 09/10/2000.

by FAQer (faqer@topixoft.com) | Done


###############################################################################
September, the 10th, 2000.
# Beta 0.2.0

If the menu title is null, ie. '', it won't try to move it.
It looked bad because of the time you have to wait until the next menu moves.

by FAQer (faqer@topixoft.com) | Done


###############################################################################
August, the 12th, 2000.
# Beta 0.1.3

Some bugs with Netscape Navigator (few versions).
For better quality setTimeout for Netscape, too, so the menus will move,
 and not just appear.
! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

by FAQer (faqer@topixoft.com) | Done


###############################################################################
August, the 11th, 2000.
# Beta 0.1.2

A few bugs with IE.

by FAQer (faqer@topixoft.com) | Done


###############################################################################
August, the 10th, 2000.
# Beta 0.1.1

Everything works with Netscape, with IE there are problems.

by FAQer (faqer@topixoft.com) | Done


###############################################################################
August, the 9th, 2000.
# Beta 0.1.0

Builds the menu using specific constants.
Everything works with Netscape, partially with IE.

by FAQer (faqer@topixoft.com) | Done


###############################################################################



        GNU GENERAL PUBLIC LICENSE
           Version 2, June 1991


  The precise terms and conditions for copying, distribution and
modification follow.

        GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION


         END OF TERMS AND CONDITIONS

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Library General
Public License instead of this License.

*/
</SCRIPT>
</BODY>
</HTML>

           
       








Related examples in the same category

1.Application Menubar Example
2.[DOM Menu] :: Example 1 :: Horizontal Menu
3.[DOM Menu] :: Example 2 :: KDE Keramik Style Menu
4.[DOM Menu] :: Example 3: Brainjar.com 'Revenge of the Menubar' Style Menu
5.[DOM Menu] Example 4: Vertical Menu
6.[DOM Menu] :: Example 5 :: Two Menus
7.[DOM Menu] :: Example 6 :: Flash Hiding
8.Menu bar for an inner fake window
9.Not too fancy menu with toolbar
10.Custom Contextual Menu(content sensitive)
11.Drop-Down Menus
12.Menu with sound
13.Menu based on Javascript
14.popup menu (content sensitive menu)
15.Complete Source Code for the Menu
16.Slide out menu
17.Dynamic menu: fly in
18.Menu and submenu
19.Slide out menu with i18N
20.Menu: XP, win 98 style
21.Simple drop-down menu example with layer
22.Build a simple fancy menu
23.Add/delete menu items
24.Customizable layout: customize menu layout
25.Vertical layout menu
26.Easy skinable menu with CSS
27.Menu Item properties
28.Direct link menu
29.Context menu: popup menu
30.Black Menu
31.Dropdown menu