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

  1. #1

    Default show/hide button

    does anyone know how to make the buttons shown on this page that show and hide text? or know where to find a tutorial on how to do so?
    [url]http://www.boyken.com/services/projectmanagement.asp[/url]

    thanks!


    furiousgeorge Guest

  2. Similar Questions and Discussions

    1. popup menus won't hide - PVII show/hide layers behaviour
      I've used the 'Auto show/hide by PVII" behaviour to create some popup menus for the navigation which make use of divs which appear and disappear....
    2. show hide netscape
      view the followinng page and both Netscape 7.2 and IE 6.0: http://128.164.137.82/sci/Untitled-2.htm When you click the check boxes for the...
    3. Show/hide Dreamweaver layers from a Flash button?
      Hello I made a nice series of buttons which can scroll, its general a series of movieclips from whichout I want to be able to close or open a...
    4. Popup; show, take focus, wait for button action, give focus, hide
      Hi. I've got a popup MC for displaying a message or asking a yes/no question that has to do the following on an event: - show and take focus...
    5. Show/hide movieClip with single button
      I am trying to show/hide a movie clip using a single button. I understand that I cannot accomplish this using layers and therefore must use a clip,...
  3. #2

    Default Re: show/hide button

    Those are simple text elements - [+] and [-].

    The text is being shown and hidden by some method of toggling the CSS style
    display:none to display:block. This is usually done with javascript. The
    relevant HTML markup is -

    <span class="h2">Development Management</span> <span class="content"><a
    href="#" STYLE="text-decoration:none" onclick="showHide('display2', this);
    return false;" id="aControl1">[+] Show more information</a><br>
    Development management services include the creation of a
    master
    plan for implementing a capital improvements program.

    <div id="display2" style="display:none;"><br>
    <STRONG>Project Planning</STRONG><BR>
    This plan incorporates objectives and functional needs,
    criteria
    for spatial relationships among areas, quality levels of
    areas
    and an outline of design criteria for structural,
    mechanical,
    electrical and special systems with estimated
    net-gross-area
    ratios. </div>

    The js function "showHide('display2', this);return false;" is simply
    toggling the style="display:none;" applied inline to the <div id="display2">
    from its current value to display:block/display:none, as well as switching
    the "+" to "-", as shown below -


    function showHide(obj, oControl)
    {
    if (!document.all && document.getElementById)
    {
    document.all = document.getElementsByTagName("*")
    }
    ns4 = (document.layers)? true:false;
    ie4 = (document.all)? true:false;

    if (ns4)
    {
    skjul="hide";
    vis="show";
    }
    else
    {
    skjul="none";
    vis="block";
    }

    if (ns4)
    {
    flipObj = document.layers[obj];
    if(flipObj.visibility==skjul)
    {
    flipObj.visibility=vis;
    oControl.innerText = "[-] Hide information";
    }
    else
    {
    flipObj.visibility=skjul;
    oControl.innerText = "[+] Show more information";
    }

    }

    if (ie4)
    {
    flipObj = document.all[obj].style;
    if(flipObj.display==skjul)
    {
    flipObj.display=vis;
    oControl.innerText = "[-] Hide information";
    }
    else
    {
    flipObj.display=skjul;
    oControl.innerText = "[+] Show more information";
    }
    }
    }
    --
    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
    ==================

    "furiousgeorge" <webforumsuser@macromedia.com> wrote in message
    news:dboapv$15v$1@forums.macromedia.com...
    > does anyone know how to make the buttons shown on this page that show and
    > hide text? or know where to find a tutorial on how to do so?
    > [url]http://www.boyken.com/services/projectmanagement.asp[/url]
    >
    > thanks!
    >
    >

    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