HV Menu on the same page more than once (horizontal and vertical)

Discussion in 'Javascript' started by cmac, Nov 9, 2004.

  1. cmac

    cmac Guest

    Greetings,

    I love the HV menu and have been uning it for a long time. I recently
    was asked how to make a page for my wife (wedding coming up soon) and
    my wife would like to have 2 ways to navigate on the same page. So
    essentially i would like to have a Horizontal menu and a vertical menu
    for people to navigate with. From everything i have been reading i
    dont think this is possible as both menus would call the same config
    file (menu_com.js). I did read once that if someone took the time to
    rename all the Var in the menu_com.js file it would work. Is this the
    only way? I send this one out to all can help and especially to Ger
    for his wisdom.

    Please help brothers and sisters....you know how future wifes can be
    and how they are.....well persistant.

    Thanks for all who reply to this...once again...thanks in advance

    cmac
    cmac, Nov 9, 2004
    #1
    1. Advertising

  2. cmac

    McKirahan Guest

    "cmac" <> wrote in message
    news:...
    > Greetings,
    >
    > I love the HV menu and have been uning it for a long time. I recently
    > was asked how to make a page for my wife (wedding coming up soon) and
    > my wife would like to have 2 ways to navigate on the same page. So
    > essentially i would like to have a Horizontal menu and a vertical menu
    > for people to navigate with. From everything i have been reading i
    > dont think this is possible as both menus would call the same config
    > file (menu_com.js). I did read once that if someone took the time to
    > rename all the Var in the menu_com.js file it would work. Is this the
    > only way? I send this one out to all can help and especially to Ger
    > for his wisdom.
    >
    > Please help brothers and sisters....you know how future wifes can be
    > and how they are.....well persistant.
    >
    > Thanks for all who reply to this...once again...thanks in advance
    >
    > cmac


    What an "HV menu"?

    Where's the source for "menu_com.js"?
    McKirahan, Nov 9, 2004
    #2
    1. Advertising

  3. cmac

    kaeli Guest

    In article <>,
    enlightened us with...
    > Greetings,
    >
    > I love the HV menu and have been uning it for a long time. I recently
    > was asked how to make a page for my wife (wedding coming up soon) and
    > my wife would like to have 2 ways to navigate on the same page. So
    > essentially i would like to have a Horizontal menu and a vertical menu
    > for people to navigate with.


    Why? She likes confusing people?

    > From everything i have been reading i
    > dont think this is possible as both menus would call the same config
    > file (menu_com.js). I did read once that if someone took the time to
    > rename all the Var in the menu_com.js file it would work. Is this the
    > only way? I send this one out to all can help and especially to Ger
    > for his wisdom.
    >


    You'd have to do a lot more than that. The functions and variables are all
    global. You'd basically need to have 4 files instead of 2 and rename
    everything in the 2 new files (menu_com and explmenu). Then you;d have to
    call Go() and the new_Go() functions in every page onLoad.

    Tell your wife this is a Bad Idea.
    And I'm a girl if it helps. *heh*

    --
    --
    ~kaeli~
    Never say, "Oops!"; always say, "Ah, interesting!"
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
    kaeli, Nov 9, 2004
    #3
  4. On Tue, 9 Nov 2004 08:09:17 -0600, kaeli <>
    wrote:

    > In article <>,
    > enlightened us with...


    [snip]

    >> From everything i have been reading i dont think this is possible as
    >> both menus would call the same config file (menu_com.js). I did read
    >> once that if someone took the time to rename all the Var in the
    >> menu_com.js file it would work. Is this the only way? I send this one
    >> out to all can help and especially to Ger for his wisdom.

    >
    > You'd have to do a lot more than that. The functions and variables are
    > all global. You'd basically need to have 4 files instead of 2 and rename
    > everything in the 2 new files (menu_com and explmenu). Then you;d have
    > to call Go() and the new_Go() functions in every page onLoad.


    I don't think that would be necessary at all. It might be a major
    endeavour, but you could make the HV menu an easily distributable object.
    Yes, you'd have to configure two separate objects, but the menu code
    itself would only be included once.

    If someone would *really* be interested in that, I might be persuaded to
    do it. I'd probably feel like bathing fifty times afterwards, though.

    Of course, if the menu was written properly in the first place, this
    wouldn't actually be necessary...

    [snip]

    Mike

    --
    Michael Winter
    Replace ".invalid" with ".uk" to reply by e-mail.
    Michael Winter, Nov 9, 2004
    #4
  5. cmac

    kaeli Guest

    In article <opsg7bu6zgx13kvk@atlantis>, d
    enlightened us with...
    > If someone would *really* be interested in that, I might be persuaded to
    > do it. I'd probably feel like bathing fifty times afterwards, though.
    >
    > Of course, if the menu was written properly in the first place, this
    > wouldn't actually be necessary...
    >


    I wouldn't bother, honestly. The code is old and outdated - it was great when
    NN4 was in use. Everything else is a hack to make it work in the new
    browsers. It makes extensive use of eval and you can't hide the menu
    completely (say, to make printer friendly pages ARGH) because of an
    inheritance issue with the CSS. It only works in quirks mode. It dies when I
    put a real doctype in my stuff.

    It's a nice, simple (and FREE) thing to use for a little application or a
    personal site, but there are too many better solutions out there these days.
    I like it, but I only use it for an intranet app - meaning, speed and browser
    compatibility are not concerns. I like it because it's so darned easy to
    modify the menu choices and look and feel, plus it works with my frames. Oh,
    and it has infinite levels of submenus.

    Got any other suggestions for free, easy to modify, across-frame-compatible,
    multi-level-submenu menus?

    --
    --
    ~kaeli~
    Quantum Express: When you absolutely, positively, don't
    know where it's going or when it needs to be there.
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
    kaeli, Nov 9, 2004
    #5
  6. On Tue, 9 Nov 2004 11:06:09 -0600, kaeli <>
    wrote:

    [snip]

    > Got any other suggestions for free, easy to modify,
    > across-frame-compatible, multi-level-submenu menus?


    I don't know if read the relevant thread in alt.html, but Richard is
    working on a script, too. It's not ready yet, but looks promising. I don't
    know how configurable it will be, nor how it will work with frames,
    though. You'd have to ask Richard what his goals are.

    Mike

    --
    Michael Winter
    Replace ".invalid" with ".uk" to reply by e-mail.
    Michael Winter, Nov 9, 2004
    #6
  7. cmac

    kaeli Guest

    In article <opsg7n2gzgx13kvk@atlantis>, d
    enlightened us with...
    > On Tue, 9 Nov 2004 11:06:09 -0600, kaeli <>
    > wrote:
    >
    > [snip]
    >
    > > Got any other suggestions for free, easy to modify,
    > > across-frame-compatible, multi-level-submenu menus?

    >
    > I don't know if read the relevant thread in alt.html, but Richard is
    > working on a script, too. It's not ready yet, but looks promising. I don't
    > know how configurable it will be, nor how it will work with frames,
    > though. You'd have to ask Richard what his goals are.


    No, I haven't. We don't get the alt groups on our server here at work. We're
    deprived. *LOL*
    Google's way too slow for my tastes and I haven't found a free newsserver
    that I like, so, I'm stuck without them ATM.

    Richard, if you're reading this, don't forget to post your solution here,
    too. :)

    --
    --
    ~kaeli~
    If a chicken and a half can lay an egg and a half in a day
    and a half, how long would it take for a monkey with a
    wooden leg to kick the dill seeds out of a pickle?
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
    kaeli, Nov 9, 2004
    #7
  8. On Tue, 9 Nov 2004 13:37:26 -0600, kaeli <>
    wrote:

    [snip]

    > Google's way too slow for my tastes and I haven't found a free
    > newsserver that I like, so, I'm stuck without them ATM.


    You've probably seen this, but just in case...

    Several people seem to be using the news servers provided free of charge
    by the University of Berlin (look for uni-berlin.de in the Path header).

    <URL:http://www.individual.net/>

    It does restrict its groups somewhat, but it should certainly carry
    technical groups. I've never used it personally, but it's reputedly fast.

    The thread I was talking about is
    <URL:http://groups.google.com/groups?threadm=cl4kmf%24ncb%241%248300dec7%40news.demon.co.uk>,
    if you're interested (starts at Richard's post). Careful if you try to
    browse the actual thread. This particular one ranges from post 54 to 116
    (numbered in the left frame). The rest are from unrelated posts. Quite a
    lot of the posts are also in response to aa's trolling, or obtuseness;
    take your pick. I'm surprised Richard actually waded through all that...

    [snip]

    Mike

    --
    Michael Winter
    Replace ".invalid" with ".uk" to reply by e-mail.
    Michael Winter, Nov 9, 2004
    #8
  9. cmac

    kaeli Guest

    In article <opsg7rg8pwx13kvk@atlantis>, d
    enlightened us with...
    >
    > The thread I was talking about is
    > <URL:http://groups.google.com/groups?threadm=cl4kmf%24ncb%241%248300dec7%40news.demon.co.uk>,
    > if you're interested (starts at Richard's post). Careful if you try to
    > browse the actual thread. This particular one ranges from post 54 to 116
    > (numbered in the left frame). The rest are from unrelated posts. Quite a
    > lot of the posts are also in response to aa's trolling, or obtuseness;
    > take your pick. I'm surprised Richard actually waded through all that...
    >


    His menu is looking pretty good, but it won't work cross-frames (that is, the
    menu appears in one frame while the subs open in another), as it simply
    changes existing LI items into menu items. I can't tell if you could include
    more than one menu on a single page.

    Plus it's going to be hell to configure colors until he implements CSS
    classes that use variables or something (if that can even be done...I dunno).
    Right now, you'd have to change the color in every single selector. Easy with
    a edit/replace, I guess, but it might fudge up.
    I can't tell if you can position the menu at a given spot. Absolute
    positioning is an important thing for many people, including myself.
    I also can't tell what would happen if a form select element was under one of
    those submenus. Form select elements have screwed up DHTML since it was
    invented, thanks to IE considering them a window object.

    So far, I like it a lot for a menu all on one page, though, and you don't
    have to include a ton of files from the look of it. You could even put the
    menu HTML in an included file if you had some sort of server-side include
    (ASP, SSI, JSP...), making it easy as heck to modify with a text editor.

    For the those womdering what the heck we're on about, check it out.

    > <URL:http://www.litotes.demon.co.uk/example_scripts/drop_menu.html>



    --
    --
    ~kaeli~
    Bakers trade bread recipes on a knead-to-know basis.
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
    kaeli, Nov 9, 2004
    #9
  10. kaeli wrote:
    > In article <opsg7rg8pwx13kvk@atlantis>,
    > d enlightened us with...

    <snip>
    >> ... . I'm surprised Richard
    >> actually waded through all that...


    I was wondering whether it would occur to aa that when a mass of experts
    repeatedly tell you that you are wrong it is probably time to re-examine
    your opinions; apparently not.

    > His menu is looking pretty good,


    Thanks. I haven't had much time to work in it recently so it isn't
    finished yet. On the other hand I will have access to a couple of Macs
    this weekend so I should have a chance to check that it is working (or
    cleanly degrading) on Mac IE and Safari versions.

    > but it won't work cross-frames (that is, the menu appears
    > in one frame while the subs open in another), as it simply
    > changes existing LI items into menu items.


    I didn't design the script to operate across frames, and there is no
    truly general cross-browser solution to menus that operate across frames
    because you would need to deduce the relative positions of all frames in
    the browser's DOM in order to line the contents up properly between
    frames. The information required for that is simply not available on
    some browsers that would otherwise happily support the script as it is.

    The cross-frame menu scripts that I have seen to date avoid that problem
    by imposing restrictions on the form and layout of the frameset used.
    Those restrictions are likely to impact heavily on the potential for
    clean degradation.

    In principle the menu defined by the HTML in one frame could be
    re-produced in all others by transferring pertinent properties to
    elements created in the other documents, but they would need to be
    accurately aligned for the result to be acceptable.

    > I can't tell if you could include more
    > than one menu on a single page.


    The script itself is fully encapsulated so there would be no problem in
    having as many operating menu instances as available memory could
    support, Though I can't see much need to have more than one.

    > Plus it's going to be hell to configure colors until he
    > implements CSS classes that use variables or something
    > (if that can even be done...I dunno).


    I see the combination of ID selectors and inserted elements with
    pre-defined classes as allowing considerable flexibility in how the
    displayed menus are styled (and differently in their active and degraded
    states).

    > Right now, you'd have to change the color in every
    > single selector.


    That requirement only exists in some CSS contexts. Given a simpler
    context there would be more potential to exploit inheritance in the CSS
    used.

    > Easy with a edit/replace, I guess, but it might fudge up.
    > I can't tell if you can position the menu at a given spot.


    One of the areas that I have been concentrating on in recent scripts is
    achieving the same fluidity in DHTML as is available through HTML and
    CSS. The menu will go exactly where you choose to put it (flowed or
    positioned). And correct itself for re-flowing and/or font re-sizing.

    > Absolute positioning is an important thing
    > for many people, including myself.


    That shouldn't be a problem, but some care would be needed in setting
    CSS overflow on any positioned container.

    > I also can't tell what would happen if a form select
    > element was under one of those submenus. Form select
    > elements have screwed up DHTML since it was invented,
    > thanks to IE considering them a window object.


    As it stands on IE select elements would be a problem, but I have a
    generalised object for hiding select elements (actually any form
    elements as <INPUT type="text/button/etc"> are equally problematic on
    some older browsers (Opera 6, for example), and a variant of the element
    position reporting object used by the script that provides an additional
    collision detection method on its interface. It is just a matter of
    swapping the position reporting object, including the form element
    hiding object, registering the pop-up DIVs with it, and triggering the
    testing whenever anything was moved, revealed or hidden, to handle
    select elements and the like. (and Jim's screening IFRAME trick works
    pretty well as an alternative (and potentially simpler approach), but
    only on the newer dynamic browsers (Opera 6 cannot cope with it at all).

    > So far, I like it a lot for a menu all on one page, though,
    > and you don't have to include a ton of files from the look
    > of it. You could even put the menu HTML in an included file
    > if you had some sort of server-side include (ASP, SSI, JSP...),
    > making it easy as heck to modify with a text editor.

    <snip>

    One of the nice things about facilitating clean degradation by defining
    the data for the script within the HTML is that server-side scripting
    only has to deal with writing HTML (not javascript data structures (the
    writing out of which is indirect, error prone and liable to introduce a
    considerable debugging and maintenance burden)), and that is exactly
    what most server-side technologies are best at (and something that the
    authors of server pages should be expected to easily understand).

    Richard.
    Richard Cornford, Nov 13, 2004
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Superman
    Replies:
    0
    Views:
    284
    Superman
    Feb 27, 2007
  2. westkite
    Replies:
    1
    Views:
    821
    scottcarl
    Nov 5, 2007
  3. Hoa

    Horizontal menu with same width menu items

    Hoa, Aug 30, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    260
  4. Gancy
    Replies:
    4
    Views:
    172
    Rasto Levrinc
    Feb 3, 2005
  5. manilal prajapati
    Replies:
    2
    Views:
    112
    Evertjan.
    Oct 17, 2007
Loading...

Share This Page