Urgent HTML help needed

Discussion in 'Tech Support' started by Journeyer, 24 Apr 2008.

  1. Journeyer

    Journeyer Minimodder

    Joined:
    31 Aug 2006
    Posts:
    3,039
    Likes Received:
    99
    Is there any way to hide/show a DIV using only <a href> or other strictly HTML/CSS functions?
    I do not wish to use javascripts to do this.
     
  2. mutznutz

    mutznutz Cos Ive got a beard u label me evil

    Joined:
    18 Nov 2007
    Posts:
    267
    Likes Received:
    0
    not that I'm aware of

    you need something client side, unless you reload the page to hide/show the div but I assume you don't want to do that?
     
  3. Journeyer

    Journeyer Minimodder

    Joined:
    31 Aug 2006
    Posts:
    3,039
    Likes Received:
    99
    Hm, no I don't.

    I was hoping there might be some way of making this work. But if not, I guess I'll have to go with a script then. We'll see, I'll mess around with it some more and see if something turns up. ;)
     
  4. Journeyer

    Journeyer Minimodder

    Joined:
    31 Aug 2006
    Posts:
    3,039
    Likes Received:
    99
    Whoah!

    Sweet. :D

    I just solved it by using display: none/block and the function GetElementById with this a href; a href="#" onclick="document.getElementById('the_div').style.display=(document.getElementById('the_div').style.display== 'block')?'none':'block';">Show/Hide Div</a

    Works like a charm. :D
     
  5. mutznutz

    mutznutz Cos Ive got a beard u label me evil

    Joined:
    18 Nov 2007
    Posts:
    267
    Likes Received:
    0
    nice ... those are javascript functions anyway but glad u got a solution
     
  6. Journeyer

    Journeyer Minimodder

    Joined:
    31 Aug 2006
    Posts:
    3,039
    Likes Received:
    99
    Yeah I figured as much, but at least I did not have to write a whole script to do this. On this platform I do not have access to the HEAD, which proves problematic sometimes. It's for work, and there the tool of choice is Episerver for some reason - which isn't all that horrible, but not excellent either. It does it's job at least.
     

Share This Page