menu problem

Discussion in 'Javascript' started by Beshoo, Apr 5, 2007.

  1. Beshoo

    Beshoo Guest

    Hey gaiz !!!

    just aim trying to make a collaps menu on timer Sowhen we over upon
    the main the Subs appear slowlly !!! i think its nice i dea ! :)

    The problem is when aim roll over the main the subs apperar and on
    mouse out the subs dissapear
    !! until now is fine !!

    BUT even when I roll over the subs THE SUBS dissapear !! :( ??

    aiv tried to sove it in more one methode i turnd the subs div to <TD>
    but it not work Take the code to get me more :)

    alot of thanx in advance :)

    -------------------------------------------------------------------------------------------------------------------------------------------------------------
    <HTML>
    <HEAD>
    <META http-equiv=Content-Type content="text/html;
    charset=windows-1256">
    <SCRIPT language=javascript>
    <!--
    var y = 1;
    var q = 5;
    var g = 0;

    function changeheight(x)
    {
    obj=document.getElementById(x);

    if(y>170&&g==0)
    {
    g=1;return;
    }
    if(y<2&&g==1)
    {
    g=0;return;
    }

    if(g)q=-5;
    if(!g)q=5;
    y=y+q;
    obj.style.height = y + 'px';
    t=setTimeout("changeheight(obj.id)",0);
    }
    // -->
    </SCRIPT>

    </HEAD>
    <BODY>
    <div style="background:#FF6600; width:100px;"
    onMouseOver="mydiv.style.display='';changeheight('mydiv');"
    onMouseOut="changeheight('mydiv');">main1</div>
    <div id="mydiv" style=" width:100px; height:0px; background-
    color:#FFCC00; overflow:hidden; display:none">Goesadasd Here <br>
    Goesadasd Here
    <br>
    Goesadasd HereGoesadasd Here</div>

    <div style="background:#FF6600; width:100px"
    onMouseOver="mydiv2.style.display='';changeheight('mydiv2');"
    onMouseOut="changeheight('mydiv2');">main1</div>
    <div id="mydiv2" style=" width:100px; height:0px; background-
    color:#FFCC00; overflow:hidden; display:none">Goesadasd Here <br>
    Goesadasd Here
    <br>
    Goesadasd HereGoesadasd Here</div>
    </BODY>
    </HTML>
     
    Beshoo, Apr 5, 2007
    #1
    1. Advertising

  2. Beshoo

    Guest

    On Apr 5, 9:09 am, "Beshoo" <> wrote:
    > Hey gaiz !!!
    >
    > just aim trying to make a collaps menu on timer Sowhen we over upon
    > the main the Subs appear slowlly !!! i think its nice i dea ! :)
    >
    > The problem is when aim roll over the main the subs apperar and on
    > mouse out the subs dissapear
    > !! until now is fine !!
    >
    > BUT even when I roll over the subs THE SUBS dissapear !! :( ??
    >
    > aiv tried to sove it in more one methode i turnd the subs div to <TD>
    > but it not work Take the code to get me more :)
    >
    > alot of thanx in advance :)
    >
    > -------------------------------------------------------------------------------------------------------------------------------------------------------------
    > <HTML>
    > <HEAD>
    > <META http-equiv=Content-Type content="text/html;
    > charset=windows-1256">
    > <SCRIPT language=javascript>
    > <!--
    > var y = 1;
    > var q = 5;
    > var g = 0;
    >
    > function changeheight(x)
    > {
    > obj=document.getElementById(x);
    >
    > if(y>170&&g==0)
    > {
    > g=1;return;
    > }
    > if(y<2&&g==1)
    > {
    > g=0;return;
    > }
    >
    > if(g)q=-5;
    > if(!g)q=5;
    > y=y+q;
    > obj.style.height = y + 'px';
    > t=setTimeout("changeheight(obj.id)",0);}
    >
    > // -->
    > </SCRIPT>
    >
    > </HEAD>
    > <BODY>
    > <div style="background:#FF6600; width:100px;"
    > onMouseOver="mydiv.style.display='';changeheight('mydiv');"
    > onMouseOut="changeheight('mydiv');">main1</div>
    > <div id="mydiv" style=" width:100px; height:0px; background-
    > color:#FFCC00; overflow:hidden; display:none">Goesadasd Here <br>
    > Goesadasd Here
    > <br>
    > Goesadasd HereGoesadasd Here</div>
    >
    > <div style="background:#FF6600; width:100px"
    > onMouseOver="mydiv2.style.display='';changeheight('mydiv2');"
    > onMouseOut="changeheight('mydiv2');">main1</div>
    > <div id="mydiv2" style=" width:100px; height:0px; background-
    > color:#FFCC00; overflow:hidden; display:none">Goesadasd Here <br>
    > Goesadasd Here
    > <br>
    > Goesadasd HereGoesadasd Here</div>
    > </BODY>
    > </HTML>


    i'd try putting mydiv inside the div with the mouseover scripts. or
    put both those divs into the same div and move the mouseover scripts
    to that new div.
     
    , Apr 6, 2007
    #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. Miguel Dias Moura
    Replies:
    3
    Views:
    4,344
    Bruno Sirianni
    Apr 3, 2004
  2. Vilmar
    Replies:
    0
    Views:
    485
    Vilmar
    May 27, 2004
  3. itzikkl
    Replies:
    0
    Views:
    5,807
    itzikkl
    Mar 27, 2005
  4. mike
    Replies:
    2
    Views:
    607
  5. Chancel

    menu problem / Cool menu

    Chancel, Sep 25, 2003, in forum: Javascript
    Replies:
    0
    Views:
    155
    Chancel
    Sep 25, 2003
Loading...

Share This Page