drop-down menus - lets discuss

Discussion in 'Javascript' started by KK, Oct 16, 2003.

  1. KK

    KK Guest

    Drop-down menus are the hottest thing since Wonder Bread but . . .
    1. Alot of people put them in the
    category (a la "frames"). Do you think this is true>
    2. Some people think they take up too much KB.
    3. Some people are worried that people who have javascript turned off
    wont be able to see them. What percent of web users have javascrips
    turned off? I thought it was around 12% but i could be wrong. If they
    do have it turned off then it there an alternative? Could your script
    detect javascript on/off before triggering the script?

    1. Is it possible to make the width of a box in a drop-down menu
    variable (i.e. 20% of page width)
    2. Anyone have a script for me to create a drop-down menu on my page?
    KK, Oct 16, 2003
    1. Advertisements

  2. A lot of people may argue against drop down menus because _they_ can't
    code them, that doesn't mean it cannot be done.
    There are certainly a lot of generic menu scripts around and the attempt
    to be flexible and general does seem to result in unreasonably large JS
    files to download. On the other hand I have seen perfectly functional,
    but totally site-specific drop down menu code written in 40 lines of
    JavaScript code and taking < 2k.
    If site navigation becomes unavailable in the absence of JavaScript then
    someone has made a serious mistake. For one thing there is no evidence
    that any major search engine robots interpret JavaScript when indexing
    pages, so they would also get the impression that the page contained no
    navigation at all (making the site appear to consist of maybe only one

    There are a number of approaches that avoid the problem of risking the
    site navigation being unavailable in the absence of JavaScript, of
    which, defining the menu structure and contents in the HTML, often as
    nested UL elements or DIVS and then using JavaScript to transform the
    nature and position of those elements so that they will serve as menus
    on browsers that support the functionality required, is a popular
    option. As a strategy it has the advantages that the navigation is
    always part of the page so it will be available if JavaScript is not,
    and it gives the menu script the opportunity to determine whether the
    browser actually supports the features required to produce a functional
    menu, so it can just leave the navigation as normal HTML whenever a drop
    down menu is not feasible.

    However, when the navigation elements are in the HTML it becomes
    necessary to use a menu script tailored to the page design, but the
    result can be considerably smaller than generic menu scripts.
    I have seen people quoting figures in the range 2% to 88% (but most
    often 8-12%), and given that range I suspect that JavaScript use figures
    are about as reliable as browser use figures. But it is more than none
    and is likely to include (at least) two important groups of visitors,
    search engine robots and some subsets of the disabled (for whom
    accessibility legislation may apply).
    With scripting disabled/unavailable there are no script based detecting
    or triggering options. NOSCRIPT elements may apply (passively) but if
    the navigation is defined in the HTML this just is not a problem.

    Yes, but it would be more logical to use dimensions that were related to
    the font size (such as em units).

    Richard Cornford, Oct 16, 2003
    1. Advertisements

  3. Not here they aren't. In most cases they don't rate all that highly on the
    usability scale, and getting them to act in the same way as normal drop
    down menus (where 'normal' is different depending on the platform) is at
    least exceptionally difficult (and probably impossible).
    Depends on the site. It shouldn't be too bad with mod_gzip.
    Only if badly written. JavaScript shouldn't add content (at least not
    essential content) to a page. It should manipulate existing HTML.
    The CSS width property accepts percentages.
    David Dorward, Oct 16, 2003
  4. JRS: In article <bmn2mm$3ff$1$>, seen in
    Richard Cornford
    That (second sentence) is only necessarily so if all navigation becomes

    Given a list such as produced in a DOS box by dir *.htm /b MiniTrue
    can readily generate the core of a page linking to all those pages. as
    long as that index page is findable, by a link from somewhere already
    known findable, the whole site should be indexed.

    On my site, index.htm links to toc.htm (intended for the framing), and
    each of those link to "all" other pages; I should be able to remove
    *all* other links internal to the site, and still get fully indexed.

    The lack of proper navigation will indeed make use by those not using JS
    difficult, but it need not inhibit search.
    Dr John Stockton, Oct 17, 2003
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.