PDA

View Full Version : Funky Gameplay menus


Black Angel
17-01-2001, 12:25
How do u do those gameplay menus at the top of this page? The drop down ones. Is some clever html, java, javascript or what. Come on you web :monkee:'s how do u do them

Nitewulf
18-01-2001, 15:33
Looks like Javascript to me

sabathius
21-01-2001, 02:38
Its clever use of simple layers! :)

Sab

DTD sIckNesS
21-01-2001, 02:44
yer using javascript to make them appear on mouseover, and disappear on mouse out ;)

BodyWarmer
21-01-2001, 10:05
Can make them with dhtml:

http://www.brainjar.com/dhtml/menubar/demo.html

Not quite the same ... :)

Black Angel
21-01-2001, 15:45
ta folks

/goes to library to get some javascript books

:E

Blobbo
31-01-2001, 20:46
This is how you do it with IE - the context is completely different with Netscape 4, and different again with Netscape 6. Netscape 6 is supposed to be the first standards compliant browser, but if its not backwards compatible, thats meaningless to authors.

Anyway, here:

Define your layer: <div id="layer1" style="visibility: hidden; position: absolute" onmouseout="javascript: layer1.visibility = 'hidden'" >

Images and things for the navigation go here... can do some nice rollover effects with <img id="image" src="blah.gif" onmouseover="javascript: image.src = 'blah2.gif'">

Close the layer (its invisible) </div>

Now its just a case of giving another object the ability to show the hidden layer... eg an image: <img id="blah2" onmouseover="javascript: layer1.style.visibility = 'visible'"

If you want it to work with netscape 4, just change 'visible' to 'show' - you'd need to write a function to make it work with both browsers. As for Netscape 6, since its 'standards compliant', the code is something like this:

onmouseover: "javascript: document.getElementById('objectid').style.visibility =
'visible'"

Note the fact that its uselessly longer, and it uses 'visible' instead of 'show' which NS4 used.

Any questions, ICQ me (910606). If you want to learn more, search for tutorials on the Document Object Model (DOM) or DHTML - Javascript books probably won't help. Look at how things work on different browsers if you can.

Hope this helps.

Regards,

-Chris/Blobbo