Re: Help - iframes / object / div's design

Discussion in 'HTML' started by Toby A Inkster, Aug 16, 2003.

  1. Dariusz wrote:

    > Anyone have a clue, or point me in the right direction on how to proceed
    > with my layout idea?


    <body onload="hideAll()">
    <h1>Main Heading</h1>
    <ul class="nav">
    <li><a href="#foo1"
    onclick="hideAll();showPart(foo1);return false;">Foo 1</a></li>
    <li><a href="#foo2"
    onclick="hideAll();showPart(foo2);return false;">Foo 2</a></li>
    <li><a href="#foo3"
    onclick="hideAll();showPart(foo3);return false;">Foo 3</a></li>
    </ul>
    <div id="foo1">
    <h2>Foo 1</h2>
    <p>Content</p>
    </div>
    <div id="foo2">
    <h2>Foo 2</h2>
    <p>Content</p>
    </div>
    <div id="foo3">
    <h2>Foo 3</h2>
    <p>Content</p>
    </div>
    </body>

    hideAll() is a JavaScript which sets the style of elements with id foo1,
    foo2 or foo3 to 'display:none;'.

    showPart(x) is a JavaScript that sets the style of the element with id x
    to 'display:block;'

    This structure should degrade very nicely in non-JavaScript browsers too.

    --
    Toby A Inkster BSc (Hons) ARCS | mailto: | pgp:0x6A2A7D39
    aim:inka80 | icq:6622880 | yahoo:tobyink | jabber:
    http://www.goddamn.co.uk/tobyink/ | "You've got spam!"
    playing://(nothing)
     
    Toby A Inkster, Aug 16, 2003
    #1
    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. PW
    Replies:
    18
    Views:
    10,690
    Whitecrest
    Jan 31, 2004
  2. K Viltersten

    <div ... /> and <div ...></div>

    K Viltersten, Mar 30, 2009, in forum: ASP .Net
    Replies:
    4
    Views:
    809
  3. Øyvind Granberg

    frames iframes and div...

    Øyvind Granberg, Jul 1, 2009, in forum: HTML
    Replies:
    43
    Views:
    1,462
    Beauregard T. Shagnasty
    Jul 6, 2009
  4. Dwayne Madsen

    Q: Div A inside Div B is larger than Div B

    Dwayne Madsen, Jun 1, 2005, in forum: Javascript
    Replies:
    1
    Views:
    239
    David Dorward
    Jun 1, 2005
  5. mscir
    Replies:
    3
    Views:
    359
    Martin Honnen
    Jun 26, 2005
Loading...

Share This Page