Closed Thread Icon

Topic awaiting preservation: animated Menue Pages that link to <a href="https://ozoneasylum.com/backlink?for=8364" title="Pages that link to Topic awaiting preservation: animated Menue" rel="nofollow" >Topic awaiting preservation: animated Menue\

 
Author Thread
Blacknight
Bipolar (III) Inmate

From: INFRONT OF MY PC
Insane since: Dec 2001

posted posted 10-28-2002 19:52

i want to have the bottom table to move down when the mouse is over someow i cant find the mistake though could you help
a jea thanks mas so far

<HTML>
<HEAD>

<TITLE></TITLE>
<style>

table{background:black;position:absolute;}
a{color:black;text-decoration:none;font:bold}

.topnav
{
font-size:80%;
top:0;
left:0;
}

.menu
{
font-size:100%;
top:-180;
z-index:-1;

}
</style>
<script type="text/javascript">
var i=200
var intHide
var speed=5

function showmenu()
{
clearInterval(intHide)
intShow=setInterval("show()",10)
}

function hidemenu()
{
clearInterval(intShow)
intHide=setInterval("hide()",10)
}

function show()
{
if (i<-18)
{
i=i+speed
menu.style.top=i
}
}

function hide()
{
if (i>-68)
{
i=i-speed
menu.style.top=i
}
}
</script>


</HEAD>
<BODY bgcolor="#666666" topmargin="0" leftmargin="0">

<table class="topnav" border="0" cellspacing="0" cellpadding="0" topmargin="0" leftmargin="0">
<tr>
<td colspan="2"><img src="menue.jpg" border="0"></td>
</tr>
<tr>
<td width="95" bgcolor="#748079"></td>
<td><img src="Border1.jpg" border="0"></td>
</tr>
<tr>
<td colspan="2" ><img src="Menue21.jpg" border="0"></td>
</tr>

</table>

<table class="menu" onmouseover="showmenu()" onmouseout="hidemenu()" border="0" cellspacing="0" cellpadding="0" topmargin="0" leftmargin="0">
<tr>
<td colspan="2"><img src="Menue22.jpg" border="0"></td>
</tr>
<tr>
<td width="84" bgcolor="#748079"></td>
<td><img src="Border2.jpg" border="0"></td>
</tr>
<tr>
<td width="84" bgcolor="#89A895"></td>
<td><img src="Border3.jpg" border="0"></td>
</tr>
</table>

</BODY>
</HTML>


[This message has been edited by Blacknight (edited 10-28-2002).]

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 10-29-2002 09:55

Ummm...

Maybe you should stick to a pre made script because your doing a lot of different things wrong here, it's hard to pick where I should start.

* Not setting position:absolute for your elements.

* The one element with events attached is positioned off screen. How you hope to make it work without events attached to the only visible element is beyond me.

* You reference elements through script as if you had pointers to them, but you don't. menu.style.top does not exist, you should be using document.getElementById("menu").style.top instead.

*** There's a heap of other problems there too -- like not setting width or height values for various elements that you seem to be assuming will be x size. Add this to you setting font sizes with 100% and 80% which will produce varied sizes throughout different browsers and this will make those previous assumptions as to how large your elements are completely wrong.

You should also be setting height, width and alt attributes for your images too, but your script should still work without these, this is more of a nit-pick.

Although a lot of these mistakes lead me to believe that you don't really know Javascript all too well. If that is the case then something like this may be a bit too much for a learning exercise. Then again, maybe not.

Blacknight
Bipolar (III) Inmate

From: INFRONT OF MY PC
Insane since: Dec 2001

posted posted 10-30-2002 12:36

thanks
i know i'm not verry good at js and i have already stoppd this idea for the time and went to do more simple things

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 11-01-2002 08:03

Don't get me wrong, I don't want to discourage you from trying but there are ways that you should attack this if your still learning.

Break it down into it's different parts and play with each bit for a while.

Play around with animating and moving layers through setTimeout()'s and setInterval()'s.
Muck around with events, attach them to things, make them spit out funny messages to the status bar or the screen.

Stuff like that. It's not that hard it just takes time to build up the knowledge how how it's all done, much like any programming language really.

Dracusis
Maniac (V) Inmate

From: Brisbane, Australia
Insane since: Apr 2001

posted posted 11-01-2002 08:15

Edit: This was a double post. My bad.

[This message has been edited by Dracusis (edited 11-05-2002).]

mas
Paranoid (IV) Inmate

From: the space between us
Insane since: Sep 2002

posted posted 11-03-2002 18:44

double post? huh?

-THE SPACE-

« BackwardsOnwards »

Show Forum Drop Down Menu