...

View Full Version : Simple menu problem



ConfusedOfLife
08-26-2002, 10:08 PM
Hi, I'm trying to make a text that when the mouse goes over that, some other texts ( seperate lines ) go beneath the main line, like a kinda simple menu. Then user can click on the second texts ( texts that appeared after the mouse went on the first text ) and by clicking on each of them, for example we have an alert. The problem is that I'm using 2 nested spans, but when the mouse leaves the first or the children span's items, the children items do not disappear. I put the code below, I hope someone can help:

//---------------------------------------------
<html>
<head>
<title>Untitled</title>
<script>
function doit(what)
{
if ( what == "open" )
document.getElementById("Sec").innerHTML =
"<span style='color : \"red\";' onclick='alert(\"hello\");'>yes</span>";
else
document.getElementById("Sec").innerHTML =
"&nbsp;";
}
</script>
</head>

<body>


<span style="position : relative; cursor : 'hand'; width : 100px" onmouseover="doit('open');" >
First Item
<span id="Sec" onmouseout="doit('close');">
&nbsp;
</span>
</span>


</body>
</html>

ConfusedOfLife
08-29-2002, 10:15 PM
Hello? it's about some days that I posted this! you mean nobody knows the answer?

Ultragames
08-29-2002, 10:21 PM
How about you just use a menu instead of trying to do a *cough* lame *cough* menu using spans.

The only way I know of to do this is using images. So when you click on the top image it changes some images below from transparent ones to ones with the words that you want showing.

Why dont you try one like, (or the actual one) found on this page. (Thereis no copyright)

xng clan (http://www.xngclan.com)

ConfusedOfLife
08-29-2002, 10:32 PM
Thanx! at least one reply! Actually they didn't pay me enough and I don't wana put a menu for them! you know what I mean! I just wanted to have a simple thing, but in my case, all the simple things do not work!

Ultragames
08-29-2002, 10:40 PM
no kidding. I am have seen millions of up-down manual scroller. But I wanna change up-down to left-right, and I've been working for days. LOL. (Thx Beetle)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum