menu problem (javascript 0

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 [ Do, 05 April 2007 15:19 ] [ ID #1679763 ]

Re: menu problem (javascript 0

"Beshoo" <basheermoro [at] gmail.com> wrote in message
news:1175779161.188116.295810 [at] o5g2000hsb.googlegroups.com...
| Hey gaiz !!!

you do realize this is a javascript question and that there are js usenet
groups, right?

|alot of thanx in advance :)

there is no such word as 'alot'. to 'allot' means to allocate. a 'lot' is
related to a parcel of land. 'a lot' denotes a vast measure/quantity.

you have heard of tertiary operators, right?

g = y > 170 && g == 0 ? 1 : 0;
q = q + 5 * (g ? -1 : 1);
y += q;

further, y, g, q are about as telling as you can get right? hell, why not
just make them non-printable characters so that they are equally useful in
your code, yet do appear to waste valuable space...that is what you're going
for with such nomanclature, right?

as for 'obj', it is standard practice to refer to an html/xml element in js
as 'el', 'node', or 'child'...again, 'obj' doesn't quite cut it. it could
refer to html or xml or it could be a js object.

now, for your problem...it is obvious. struggle a bit more and you'll see
it.
Steve [ Do, 05 April 2007 15:40 ] [ ID #1679764 ]

Re: menu problem (javascript 0

Steve wrote:
>
> you have heard of tertiary operators, right?
>
> g = y > 170 && g == 0 ? 1 : 0;
> q = q + 5 * (g ? -1 : 1);
> y += q;
>

Sorry I though it was "ternary" operator, not "tertiary"... Which one is
correct?
Hendri
Hendri Kurniawan [ Sa, 07 April 2007 23:01 ] [ ID #1681262 ]

Re: menu problem (javascript 0

"Hendri Kurniawan" <ask-me [at] email.com> wrote in message
news:131g1kl294748ce [at] corp.supernews.com...
> Steve wrote:
>>
>> you have heard of tertiary operators, right?
>>
>> g = y > 170 && g == 0 ? 1 : 0;
>> q = q + 5 * (g ? -1 : 1);
>> y += q;
>>
>
> Sorry I though it was "ternary" operator, not "tertiary"... Which one is correct?

PHP specifically calls it a ternary operator, but it means the same thing as a tertiary
operator.

I believe in ActionScript it is specifically called the tertiary operator.

They all originate around the "group of three" premise.

-Lost
-Lost [ Sa, 07 April 2007 23:32 ] [ ID #1681263 ]

Re: menu problem (javascript 0

"Hendri Kurniawan" <ask-me [at] email.com> wrote in message
news:131g1kl294748ce [at] corp.supernews.com...
| Steve wrote:
| >
| > you have heard of tertiary operators, right?
| >
| > g = y > 170 && g == 0 ? 1 : 0;
| > q = q + 5 * (g ? -1 : 1);
| > y += q;
| >
|
| Sorry I though it was "ternary" operator, not "tertiary"... Which one is
| correct?

i had a brain-fart...it typically is referred to as ternary.
Steve [ So, 08 April 2007 16:56 ] [ ID #1681766 ]
PHP » alt.php » menu problem (javascript 0

Vorheriges Thema: how to backup website using php
Nächstes Thema: Is It Possible To Force Closing A Session ID Without Closing The Browser?