I want to hide DIV place holder

Discussion in 'Javascript' started by Darren, Aug 15, 2005.

  1. Darren

    Darren Guest

    This works fine in netscape but IE won't do it. I have a div which contains
    some links and a thumbnail. What's supposed to happen is when you click the
    thumbnail the links disapear and the now invisible div is resized moving
    everything below it. In IE it only resizes as small as the size of the dive
    plus the size of the links.

    heres an example

    <div class="relatedLinks" id="posix">
    <h3>Posix (Linux,UNIX,BSD)</h3>
    <img id ="posixDropdownButton" src="downarrow.gif" width="8" height="8"
    onClick="showHideDropDown('posixSection','posixDropdownButton','posixSection
    ','8px','112px')">
    <div id="posixSection">
    <a href="http://www.freshmeat.net" target="_top">Freshmeat</a>
    <a href="http://www.redhat.com/" target="_top">RedHat Linux</a>
    <a href="http://www.debian.org/" target="_top">Debian Linux</a>
    <a href="http://www.novell.com/linux/suse/" target="_top">Suse
    Linux</a>
    <a href="http://www.slackware.com/" target="_top">Slackware
    Linux</a>
    <a href="http://www.freebsd.org/" target="_top">FreeBSD</a>
    <a href="http://www.openbsd.org/" target="_top">OpenBSD</a>
    </div>
    </div>

    the function for doiong the magic is

    function showHideDropDown(tItem,tIcon,tParent,tMin,tMax)
    {
    var lItem=document.getElementById(tItem);
    var lIcon=document.getElementById(tIcon);
    var parentSection=document.getElementById(tParent);
    if (lIcon.src.search("uparrow.gif")!=-1)
    {
    lIcon.src="downarrow.gif";
    lItem.style.visibility="hidden";
    parentSection.style.height=tMin;

    }
    else
    {
    lIcon.src="uparrow.gif";
    lItem.style.visibility="visible";
    parentSection.style.height=tMax;
    }

    }

    It works terrific in netscape but it looks tacky in IE. Any ideas how to
    make it work properly?

    Thanks
    Darren, Aug 15, 2005
    #1
    1. Advertising

  2. Darren

    Darren Guest

    "Martin Kurz" <-berlin.de> wrote in message
    news:-berlin.de...
    > Hi Darren,


    Spot on Marten. That did the trick. Thanks so much.
    Darren, Aug 15, 2005
    #2
    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. suzy

    place holder / xslt table

    suzy, Jul 14, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    415
  2. Elizabeth Harmon

    Finding Controls in a Place Holder

    Elizabeth Harmon, Nov 13, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    389
    George Paiva
    Nov 13, 2003
  3. Karl Seguin

    place holder

    Karl Seguin, Sep 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    490
    http://www.visual-basic-data-mining.net/forum
    Sep 23, 2004
  4. JAPHET

    How to align Place Holder

    JAPHET, Sep 23, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    541
    Karl Seguin
    Sep 23, 2004
  5. Replies:
    3
    Views:
    2,882
    Bruce Barker
    Sep 8, 2005
Loading...

Share This Page