Javascript menu

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • CarbonTerry
    Major General

    • Oct 2005
    • 2620

    Javascript menu

    Hi,
    I am using a javascript menu as follows:

    var NoOffFirstLineMenus=10; // Number of first level items
    var LowBgColor='4343C3'; // Background color when mouse is not over
    var LowSubBgColor='4343C3'; // Background color when mouse is not over on subs
    var HighBgColor='969696'; // Background color when mouse is over
    var HighSubBgColor='969696'; // Background color when mouse is over on subs
    var FontLowColor='FFFFFF'; // Font color when mouse is not over
    var FontSubLowColor='FFFFFF'; // Font color subs when mouse is not over
    var FontHighColor='FFFFFF'; // Font color when mouse is over
    var FontSubHighColor='FFFFFF'; // Font color subs when mouse is over
    var BorderColor='000000'; // Border color
    var BorderSubColor='000000'; // Border color for subs
    var BorderWidth=1; // Border width
    var BorderBtwnElmnts=1; // Border between elements 1 or 0
    var FontFamily="Century Gothic" // Font family menu items
    var FontSize=12; // Font size menu items
    var FontBold=1; // Bold menu items 1 or 0
    var FontItalic=0; // Italic menu items 1 or 0
    var MenuTextCentered='left'; // Item text position 'left', 'center' or 'right'
    var MenuCentered='left'; // Menu horizontal position 'left', 'center' or 'right'
    var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle','bottom' or static
    var ChildOverlap=.2; // horizontal overlap child/ parent
    var ChildVerticalOverlap=.2; // vertical overlap child/ parent
    var StartTop=200; // Menu offset x coordinate
    var StartLeft=25; // Menu offset y coordinate
    var VerCorrect=0; // Multiple frames y correction
    var HorCorrect=0; // Multiple frames x correction
    var LeftPaddng=3; // Left padding
    var TopPaddng=2; // Top padding
    var FirstLineHorizontal=0; // SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
    var MenuFramesVertical=1; // Frames in cols or rows 1 or 0
    var DissapearDelay=1000; // delay before menu folds in
    var TakeOverBgColor=1; // Menu frame takes over background color subitem frame
    var FirstLineFrame='navig'; // Frame where first level appears
    var SecLineFrame='space'; // Frame where sub levels appear
    var DocTargetFrame='space'; // Frame where target documents appear
    var TargetLoc=''; // span id for relative positioning
    var HideTop=0; // Hide first level when loading new document 1 or 0
    var MenuWrap=1; // enables/ disables menu wrap 1 or 0
    var RightToLeft=0; // enables/ disables right to left unfold 1 or 0
    var UnfoldsOnClick=0; // Level 1 unfolds onclick/ onmouseover
    var WebMasterCheck=0; // menu tree checking on or off 1 or 0
    var ShowArrow=1; // Uses arrow gifs when 1
    var KeepHilite=1; // Keep selected path highligthed
    var Arrws=['tri.gif',5,10,'tridown.gif',10,5,'trileft.gif',5, 10]; // Arrow source, width and height

    This works well for me however when the window size changes the menu moves to the left to accomodate the larger window.
    How do I modify the script above to keep the menu in one place?
    Thanks.....
    CarbonTerry
    Semper Fi
    Still green...still mean......just not as lean

    Red Hawk Archery
    Zone 5 Photo
    My USMC
  • CarbonTerry
    Major General

    • Oct 2005
    • 2620

    #2
    Re: Javascript menu

    anyone?
    CarbonTerry
    Semper Fi
    Still green...still mean......just not as lean

    Red Hawk Archery
    Zone 5 Photo
    My USMC

    Comment

    • CarbonTerry
      Major General

      • Oct 2005
      • 2620

      #3
      Re: Javascript menu

      Please help if you can.
      CarbonTerry
      Semper Fi
      Still green...still mean......just not as lean

      Red Hawk Archery
      Zone 5 Photo
      My USMC

      Comment

      • navaldesign
        General & Forum Moderator

        • Oct 2005
        • 12080

        #4
        Re: Javascript menu

        Hi Terry

        This menu uses absolute coordinates, as well as the centering div id to keep the menu within the BV page set limits.

        To keep it always to the left, BUT within the limits set in BV;
        Add the word container (That's how BV names the centering div) as i have done bellow (look changes in RED)
        Set the StartLeft margin to be 0 (you may set it to whatever you want, it will result in moving the menu to the right for the same amount of pixels)
        Set the StartTop margin to whatever you need it to be counting from the top of page. Now it is set to 182 and i left it so.

        Bye

        George


        var NoOffFirstLineMenus=11; // Number of first level items
        var LowBgColor='C1C1C1'; // Background color when mouse is not over
        var LowSubBgColor='C1C1C1'; // Background color when mouse is not over on subs
        var HighBgColor='FFFFFF'; // Background color when mouse is over
        var HighSubBgColor='FFFFFF'; // Background color when mouse is over on subs
        var FontLowColor='4E4E4E'; // Font color when mouse is not over
        var FontSubLowColor='4E4E4E'; // Font color subs when mouse is not over
        var FontHighColor='000000'; // Font color when mouse is over
        var FontSubHighColor='000000'; // Font color subs when mouse is over
        var BorderColor='000000'; // Border color
        var BorderSubColor='000000'; // Border color for subs
        var BorderWidth=1; // Border width
        var BorderBtwnElmnts=1; // Border between elements 1 or 0
        var FontFamily="Arial" // Font family menu items
        var FontSize=10; // Font size menu items
        var FontBold=0; // Bold menu items 1 or 0
        var FontItalic=0; // Italic menu items 1 or 0
        var MenuTextCentered='left'; // Item text position 'left', 'center' or 'right'
        var MenuCentered='left'; // Menu horizontal position 'left', 'center' or 'right'
        var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle','bottom' or static
        var ChildOverlap=.2; // horizontal overlap child/ parent
        var ChildVerticalOverlap=.2; // vertical overlap child/ parent
        var StartTop=182; // Menu offset x coordinate
        var StartLeft=0; // Menu offset y coordinate
        var VerCorrect=0; // Multiple frames y correction
        var HorCorrect=0; // Multiple frames x correction
        var LeftPaddng=3; // Left padding
        var TopPaddng=2; // Top padding
        var FirstLineHorizontal=0; // SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
        var MenuFramesVertical=1; // Frames in cols or rows 1 or 0
        var DissapearDelay=1000; // delay before menu folds in
        var TakeOverBgColor=1; // Menu frame takes over background color subitem frame
        var FirstLineFrame='navig'; // Frame where first level appears
        var SecLineFrame='space'; // Frame where sub levels appear
        var DocTargetFrame='space'; // Frame where target documents appear
        var TargetLoc='container'; // span id for relative positioning
        var HideTop=0; // Hide first level when loading new document 1 or 0
        var MenuWrap=1; // enables/ disables menu wrap 1 or 0
        var RightToLeft=0; // enables/ disables right to left unfold 1 or 0
        var UnfoldsOnClick=0; // Level 1 unfolds onclick/ onmouseover
        var WebMasterCheck=0; // menu tree checking on or off 1 or 0
        var ShowArrow=1; // Uses arrow gifs when 1
        var KeepHilite=1; // Keep selected path highligthed
        var Arrws=['tri.gif',5,10,'tridown.gif',10,5,'trileft.gif',5, 10]; // Arrow source, width and height
        Navaldesign
        Logger Lite: Low Cost, Customizable, multifeatured Login script
        Instant Download Cart: a Powerfull, Customized, in site, DB driven, e-products Cart
        DBTechnosystems.com Forms, Databases, Shopping Carts, Instant Download Carts, Loggin Systems and more....
        Advanced BlueVoda Form Processor : No coding form processor! Just install and use! Now with built in CAPTCHA!

        Comment

        • CarbonTerry
          Major General

          • Oct 2005
          • 2620

          #5
          Re: Javascript menu

          Wooohooo...thanks George !!!!
          It works puuurfectly
          CarbonTerry
          Semper Fi
          Still green...still mean......just not as lean

          Red Hawk Archery
          Zone 5 Photo
          My USMC

          Comment

          Working...
          X