Expanding menu script...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MrKillington

    Expanding menu script...


    I'm having a problem with a script I'm writing. It's designed to expan
    a menu using the div tag and some scripting. Basically, there's
    division for the "upper level" menus and a division for the men
    options below them. the script is designed to simply toggle th
    "display" property from "block" to "none" everytime the user clicks o
    a supermenu. all i get, though, is an error on the page. here's wha
    i've pared it down to:
    var Temp = document.all[("s"+divNum)];
    Temp.style["display"] = "block";
    where the division I'm trying to open has an id value of "s0" and
    call the function using javascript:open Menu(0).
    so as it stands all the script does is open the submenu once, but if
    can get that to work the rest will be cake. does anyone know how t
    make this work?
    p.s. sorry for the capitalization, the shift key on this keyboar
    doesn't work very well >_

    MrKillingto
    -----------------------------------------------------------------------
    Posted via http://www.forum4designers.co
    -----------------------------------------------------------------------
    View this thread: http://www.forum4designers.com/message39368.htm

  • MrKillington

    #2
    Re: Expanding menu script...


    Seriously, if anyone could help me..

    MrKillingto
    -----------------------------------------------------------------------
    Posted via http://www.forum4designers.co
    -----------------------------------------------------------------------
    View this thread: http://www.forum4designers.com/message39368.htm

    Comment

    • kaeli

      #3
      Re: Expanding menu script...

      In article <MrKillington.1 0uuwo@mail.foru m4designers.com >,
      MrKillington.10 uuwo@mail.forum 4designers.com enlightened us with...[color=blue]
      >
      > I'm having a problem with a script I'm writing. It's designed to expand
      > a menu using the div tag and some scripting. Basically, there's a
      > division for the "upper level" menus and a division for the menu
      > options below them. the script is designed to simply toggle the
      > "display" property from "block" to "none" everytime the user clicks on
      > a supermenu. all i get, though, is an error on the page. here's what
      > i've pared it down to:
      > var Temp = document.all[("s"+divNum)];
      > Temp.style["display"] = "block";[/color]


      Your script is IE only, using document.all.

      That makes it hard for non-IE users to help you at all.

      --
      --
      ~kaeli~
      Any sufficiently advanced technology is indistinguishab le
      from magic.



      Comment

      • Richard Cornford

        #4
        Re: Expanding menu script...

        "MrKillingt on" <MrKillington.1 0uuwo@mail.foru m4designers.com > wrote in
        message news:MrKillingt on.10uuwo@mail. forum4designers .com...
        <snip>[color=blue]
        >... . all i get, though, is an error on the page.[/color]

        You don't see any reason to mention what that error actually was?
        [color=blue]
        >here's what i've pared it down to:[/color]

        How? Why?
        [color=blue]
        >var Temp = document.all[("s"+divNum)];
        >Temp.style["display"] = "block";[/color]

        Assuming the browser implements the Microsoft proprietary -
        document.all - collection, the mark-up is as described, the ID is unique
        on the page (and does not correspond with any NAME attributes), the
        browser implements a - style - object on its element objects and
        recognises and responds to the dynamic setting of the - display -
        property on that - style - object, then the above code should behave as
        expected.

        Of course you are the only person in a position to tell if all of those
        assumptions are correct, as you have not provided that information to
        us.
        [color=blue]
        >... javascript:open Menu(0).[/color]

        So is that a javascript: pseudo protocol HREF on a link (in which case:-

        <URL: http://www.jibbering.com/faq/#FAQ4_24 >

        - and don't do that) or is it an event handling attribute with a
        superfluous label, and if so, with which element is it associated? The
        DIV? Some other element?

        <snip>[color=blue]
        >p.s. sorry for the capitalization, the shift key on
        >this keyboard doesn't work very well >_<[/color]

        In a plain text medium like Usenet details like capitalisation and
        formatting can go a long way towards improving communication. Simple
        things like separating paragraphs (and code blocks) with a blank line
        make reading posts considerably easier. And you do not encourage people
        to help by discouraging them from reading your question.

        <snip>[color=blue]
        > Posted via http://www.forum4designers.com[/color]
        <snip>

        Beyond the fact that the totally inappropriate presentation of
        comp.lang.javes cript on forum4designers .com serves to inhibit the
        comprehension of most of the code presented on the group, the fact that
        forum4designers .com attempted to perpetrate a deception as to the nature
        of the service they were providing and still do not adequately attribute
        the sources of their content has resulted in a certain level of enmity
        for forum4designes. com developing on Usenet. As a result
        forum4designers .com is probably an unwise place to ask for help from,
        and it is certainly not a good place to read comp.lang.javas cript from.

        You would probably be best off accessing Usenet through some sort of
        newsreader software (and your ISP's news server(s)), and if web based
        assess is all that is possible for you groups.coogle.c om present
        comp.lang.javas cript in an undistorted from and allow posting to the
        group. There are also numerous other providers of web based access, some
        of which do a reasonable job of presenting the group, and none of which
        have yet achieved the negative reputation of forum4designers .com.

        Richard.


        Comment

        Working...