HTML help

Discussion in 'Bulletin Board ARCHIVE' started by Dyson, May 18, 2009.

  1. Dys

    Dyson Well-Known Member

    Joined:
    Jul 13, 2005
    Messages:
    14,446
    Likes Received:
    4,698
    Trophy Points:
    113
    Location:
    Tarn centre
    Home Page:
    Style:
    Barnsley (full width)
    I've got a section of text (currently within a layer) that I want hiding until a link is selected. I've used the show/hide div function before but it doesn't seem to be working within a layer.</p>

    Any ideas?</p>

    Code I'm using is:

    &lt;a href=&quot;http://www.barnsleyfc.org.uk/bbs/forums/thread-post.asp#&quot; onClick=&quot;showhide(paygphonedd)&quot;&gt;
    &lt;div class=&quot;style1&quot; id=&quot;paygphonedd&quot; style=&quot;display=none&quot;&gt;
    &lt;p&gt;TEST&lt;/p&gt;
    &lt;p&gt;&lt;/p&gt;&lt;/div&gt;</p>

    What do I need to include so it's hidden until selected?</p>

    TIA.</p>
     
  2. Jon

    Jonno Member

    Joined:
    Jan 23, 2008
    Messages:
    850
    Likes Received:
    8
    Trophy Points:
    18
    Location:
    Barnsley
    Style:
    Barnsley (full width)
    Tha dunt know owt abart computers thee... nt
     
  3. Dys

    Dyson Well-Known Member

    Joined:
    Jul 13, 2005
    Messages:
    14,446
    Likes Received:
    4,698
    Trophy Points:
    113
    Location:
    Tarn centre
    Home Page:
    Style:
    Barnsley (full width)
    Exactly.....
     
  4. Anderson15

    Anderson15 Active Member

    Joined:
    Feb 18, 2007
    Messages:
    3,766
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    The Kingdom of Barnsley
    Home Page:
    Style:
    Barnsley (full width)
  5. driver

    driver New Member

    Joined:
    Jul 20, 2005
    Messages:
    1,844
    Likes Received:
    0
    Trophy Points:
    0
    Home Page:
    Style properties are defined using colon not equals so
    </p>

    style=&quot;display=none&quot; </p>

    should be</p>

    style=&quot;display:none&quot;
    </p>

    Showhide is not a standard javascript function, but assuming its something that is included this should work if you quote the div id. You should also return false from the onclick so it doesn't try opening the #link. So something like:</p>

    &lt;a xhref=&quot;http://www.barnsleyfc.org.uk/bbs/forums/thread-post.asp#&quot; onclick=&quot;showhide('paygphonedd');return false&quot;&gt;link test&lt;/a&gt;
    </p>

    </p>
     
  6. driver

    driver New Member

    Joined:
    Jul 20, 2005
    Messages:
    1,844
    Likes Received:
    0
    Trophy Points:
    0
    Home Page:
    The bbs has munged that, it should just be href not xhref, and it automatically added the barnsleyfc.org.uk link, when it should just be #
     
  7. Dys

    Dyson Well-Known Member

    Joined:
    Jul 13, 2005
    Messages:
    14,446
    Likes Received:
    4,698
    Trophy Points:
    113
    Location:
    Tarn centre
    Home Page:
    Style:
    Barnsley (full width)
    Reight - this is getting on my tits now.

    The code I've got now is:

    span class="style95"
    'a href="#" onclick="showhide('paygphonedd');return false"'
    div class="style77" id="paygphonedd">TEST</div

    It's showing the Div tag fine & the show/hide seems to be working, however, the tag section is showing permanently so no point having show/hide. I need it to be hidden until selected.

    Help!?!?!!?!
     
  8. driver

    driver New Member

    Joined:
    Jul 20, 2005
    Messages:
    1,844
    Likes Received:
    0
    Trophy Points:
    0
    Home Page:
    I am sure exactly what you are trying to do. But showhide will presumably show the target element if its currently hidden, and hide it if its currently visible? Do you want the link to disappear after you have clicked to see the div? If so then you need to call showhide twice. Once to show the div, and once to hide the link. The div cannot be inside the link and vice versa, because when you hide the link, you are also hiding the div. </p>

    If this isn't what you are wanting, then send me a link or summat, cos I don't understand what you are trying to do.
    </p>
     
  9. Dys

    Dyson Well-Known Member

    Joined:
    Jul 13, 2005
    Messages:
    14,446
    Likes Received:
    4,698
    Trophy Points:
    113
    Location:
    Tarn centre
    Home Page:
    Style:
    Barnsley (full width)
    PM mate!
     

Share This Page