View Full Version : Simple menu problem

08-26-2002, 11: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:

function doit(what)
if ( what == "open" )
document.getElementById("Sec").innerHTML =
"<span style='color : \"red\";' onclick='alert(\"hello\");'>yes</span>";
document.getElementById("Sec").innerHTML =


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


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

08-29-2002, 11: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)

08-29-2002, 11: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!

08-29-2002, 11: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)