Using a jump-menu to display a div layer?

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default Using a jump-menu to display a div layer?

    I want to show you some code that uses checkboxes to display or hide a layer. I
    would like to be able to make the same thing using a jump-menu instead of the
    radio buttons. I'm not at all handy with javascript, so my efforts to try to
    change this code has been futile. Can anyone help. Here is the code. It's short
    so copy it and play with it.
    I appreciate any help.

    <html><head>
    <script>
    function toggle(theDiv){
    var elem = document.getElementById(theDiv);
    elem.style.display = (elem.style.display == "none")? "" : "none";
    }

    //-->
    </script>
    </head>
    <body>
    <form name="form1">
    1<INPUT id="Checkbox1" type="checkbox" name="Checkbox1"
    onClick='toggle("table1")'>
    2<INPUT id="Checkbox1" type="checkbox" name="Checkbox1"
    onClick='toggle("table2")'>
    3<INPUT id="Checkbox1" type="checkbox" name="Checkbox1"
    onClick='toggle("table3")'>
    4<INPUT id="Checkbox1" type="checkbox" name="Checkbox1"
    onClick='toggle("table4")'>
    5<INPUT id="Checkbox1" type="checkbox" name="Checkbox1"
    onClick='toggle("table5")'>
    </form>
    <div id="table1" style='display: none;'>
    table 1
    </div>
    <div id="table2" style='display: none;'>
    table 2
    </div>
    <div id="table3" style='display: none;'>
    table 3
    </div>
    <div id="table4" style='display: none;'>
    table 4
    </div>
    <div id="table5" style='display: none;'>
    table 5
    </div>
    </body>
    </html>
    -----------------
    Chris

    Glitch001 Guest

  2. Similar Questions and Discussions

    1. jump menu question
      I have a jump menu that doesn't work properly all i want is to select a menu and press go and opens in a new window and then the menu goes back...
    2. java for jump menu?
      I have used the Jump Menu tool in Dreamweaver to create a two-item jump menu. I get a javascript error -- Object Expected -- when I try to select an...
    3. jump menu help
      I am useing Dreamweaver Mx and tring to insert a jump menu into my page. I want the link to open up in a new window. I cant seem to get it to do...
    4. jump to menu at end of movie
      I have a menu that links to 5 movies. I need to jump back to the menu when each movie ends. How do I do that? Thanks.
    5. How do you set the width of a jump menu?
      Mine keep coming up too shot to diplay all the text characters -- cuts them off and substitutes ellipsis.
  3. #2

    Default Re: Using a jump-menu to display a div layer?

    [url]http://www.mickweb.com/javascript/forms/jumpmenus/jumplayer.html[/url]
    [url]http://www.mickweb.com/javascript/forms/jumpmenus/jumplayer2.html[/url]


    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "Glitch001" <webforumsuser@macromedia.com> wrote in message
    news:ceot8i$bgj$1@forums.macromedia.com...
    > I want to show you some code that uses checkboxes to display or hide a
    layer. I
    > would like to be able to make the same thing using a jump-menu instead of
    the
    > radio buttons. I'm not at all handy with javascript, so my efforts to try
    to
    > change this code has been futile. Can anyone help. Here is the code. It's
    short
    > so copy it and play with it.
    > I appreciate any help.
    >
    > <html><head>
    > <script>
    > function toggle(theDiv){
    > var elem = document.getElementById(theDiv);
    > elem.style.display = (elem.style.display == "none")? "" : "none";
    > }
    >
    > //-->
    > </script>
    > </head>
    > <body>
    > <form name="form1">
    > 1<INPUT id="Checkbox1" type="checkbox" name="Checkbox1"
    > onClick='toggle("table1")'>
    > 2<INPUT id="Checkbox1" type="checkbox" name="Checkbox1"
    > onClick='toggle("table2")'>
    > 3<INPUT id="Checkbox1" type="checkbox" name="Checkbox1"
    > onClick='toggle("table3")'>
    > 4<INPUT id="Checkbox1" type="checkbox" name="Checkbox1"
    > onClick='toggle("table4")'>
    > 5<INPUT id="Checkbox1" type="checkbox" name="Checkbox1"
    > onClick='toggle("table5")'>
    > </form>
    > <div id="table1" style='display: none;'>
    > table 1
    > </div>
    > <div id="table2" style='display: none;'>
    > table 2
    > </div>
    > <div id="table3" style='display: none;'>
    > table 3
    > </div>
    > <div id="table4" style='display: none;'>
    > table 4
    > </div>
    > <div id="table5" style='display: none;'>
    > table 5
    > </div>
    > </body>
    > </html>
    > -----------------
    > Chris
    >

    Murray *TMM* Guest

  4. #3

    Default Re: Using a jump-menu to display a div layer?


    I do love the Web. Thank you whoever you are.
    Chris
    Glitch001 Guest

  5. #4

    Default Re: Using a jump-menu to display a div layer?

    Thank Mick! 8)

    --
    Murray --- ICQ 71997575
    Team Macromedia Volunteer for Dreamweaver
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================

    "Glitch001" <webforumsuser@macromedia.com> wrote in message
    news:ceqm4v$a03$1@forums.macromedia.com...
    >
    > I do love the Web. Thank you whoever you are.
    > Chris

    Murray *TMM* Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139