View Full Version : How Do I geta dropdown Menu?
Jaysir
23-11-2006, 11:26 PM
I want a drop down menu like:
http://www.Habbox.com/ (http://www.habbox.com)
and
http://www.interhabbo.net/
how do I set those up?
Colin-Roberts
23-11-2006, 11:28 PM
look on dymanicdrive.com
Lysine
23-11-2006, 11:30 PM
http://www.dynamicdrive.com/dynamicindex1/switchmenu.htm
That is the link
Jaysir
23-11-2006, 11:37 PM
Thanks :) + Rep to both of you
Jaysir
23-11-2006, 11:59 PM
Wow I'm sooo lost :S
okay look my site: Click Here (http://habbo-xplode.roberts-hosting.com/#)
and i want a drop down menu... but i bought this layout from someone and i'm not sure how to make the buttons into a drop down.. because it might mess with the coding.
help?
if i do the code would u giv me rep? or sumting nice lool
Jaysir
24-11-2006, 12:15 AM
Of course I would Give you rep :P I give rep out like candy :P
loool oki gime 10min u got confused with the iframe and the links..
Jaysir
24-11-2006, 12:20 AM
alright :)
Thanks in advance! :D
<style type="text/css">
.menutitle{
cursor:pointer;
margin-bottom: 5px;
background-color:#ECECFF;
color:#000000;
width:140px;
padding:2px;
text-align:center;
font-weight:bold;
/*/*/border:1px solid #000000;/* */
}
.submenu{
margin-bottom: 0.5em;
}
</style>
<script type="text/javascript">
/***********************************************
* Switch Menu script- by Martial B of http://getElementById.com/
* Modified by Dynamic Drive for format & NS4/IE4 compatibility
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
var persistmenu="yes" //"yes" or "no". Make sure each SPAN content contains an incrementing ID starting at 1 (id="sub1", id="sub2", etc)
var persisttype="sitewide" //enter "sitewide" for menu to persist across site, "local" for this page only
if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}
function SwitchMenu(obj){
if(document.getElementById){
var el = document.getElementById(obj);
var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
if(el.style.display != "block"){ //DynamicDrive.com change
for (var i=0; i<ar.length; i++){
if (ar[i].className=="submenu") //DynamicDrive.com change
ar[i].style.display = "none";
}
el.style.display = "block";
}else{
el.style.display = "none";
}
}
}
function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(off set, end))
}
}
return returnvalue;
}
function onloadfunction(){
if (persistmenu=="yes"){
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=get_cookie(cookiename)
if (cookievalue!="")
document.getElementById(cookievalue).style.display ="block"
}
}
function savemenustate(){
var inc=1, blockid=""
while (document.getElementById("sub"+inc)){
if (document.getElementById("sub"+inc).style.display=="block"){
blockid="sub"+inc
break
}
inc++
}
var cookiename=(persisttype=="sitewide")? "switchmenu" : window.location.pathname
var cookievalue=(persisttype=="sitewide")? blockid+";path=/" : blockid
document.cookie=cookiename+"="+cookievalue
}
if (window.addEventListener)
window.addEventListener("load", onloadfunction, false)
else if (window.attachEvent)
window.attachEvent("onload", onloadfunction)
else if (document.getElementById)
window.onload=onloadfunction
if (persistmenu=="yes" && document.getElementById)
window.onunload=savemenustate
</script>
remember to put tht on top of your page. now for the code.
<!-- Keep all menus within masterdiv-->
<div id="masterdiv">
<div class="menutitle" onclick="SwitchMenu('sub1')">UrbanHabbo</div>
<span class="submenu" id="sub1">
- <a href="http://habbo-xplode.roberts-hosting.com/theteam.htm">The Team</a><br>
- <a href="http://habbo-xplode.roberts-hosting.com/about.htm">About Us</a><br>
- <a href="http://habbo-xplode.roberts-hosting.com/jobs.htm">Job Openings</a><br>
- <a href="http://habbo-xplode.roberts-hosting.com/contact.htm">Contact Us</a><br>
- <a href="http://habbo-xplode.roberts-hosting.com/disclaimer.htm">Disclaimer</a>
</span>
<div class="menutitle" onclick="SwitchMenu('sub2')">Media</div>
<span class="submenu" id="sub2">
- <a href="http://habbo-xplode.roberts-hosting.com/articles.htm">Articles</a><br>
- <a href="http://habbo-xplode.roberts-hosting.com/interviews.htm">Interviews</a><br>
- <a href="http://habbo-xplode.roberts-hosting.com/rreviews.htm">Room Reviews</a><br>
- <a href="http://habbo-xplode.roberts-hosting.com/freviews.htm">Fansite Reviews</a>
</span></div>
tell me if that works and il do the rest.
and if you anit got the urbanhabbo.net domain. you can get it for free here the link http://www.eclipse.net.uk/index.cfm?id=home_res it some where there =)
Jaysir
24-11-2006, 12:36 AM
See i just dont know where to put this :S will yout ell me where heres what I'm working with
<td rowspan="8">
<img width="111" height="752" border="0" alt="" id="index_r7_c1" src="index_r7_c1.png" name="index_r7_c1"></td><td valign="top" bgcolor="#ffffff" colspan="2" rowspan="3"><a onmouseover="MM_swapImage('Image49','','linkhomepager.png',1)" onmouseout="MM_swapImgRestore()" target="middle" href="home.htm">
<img width="100" height="12" border="0" id="Image49" name="Image49" src="linkhomepage.png" alt=""></a><a onmouseover="MM_swapImage('Image50','','linknewsr.png',1)" onmouseout="MM_swapImgRestore()" target="middle" href="news.php">
<img width="100" height="12" border="0" id="Image50" name="Image50" src="linknews.png" alt=""></a><a onmouseover="MM_swapImage('Image51','','linkurbanhabbor.png',1)" onmouseout="MM_swapImgRestore()" target="middle" href="urbanhabbo.htm">
<img width="100" height="12" border="0" id="Image51" name="Image51" src="linkurbanhabbo.png" alt=""></a><a onmouseover="MM_swapImage('Image52','','linkmediar.png',1)" onmouseout="MM_swapImgRestore()" target="middle" href="media.htm">
<img width="100" height="12" border="0" id="Image52" name="Image52" src="linkmedia.png" alt=""></a><a onmouseover="MM_swapImage('Image53','','linkradior.png',1)" onmouseout="MM_swapImgRestore()" target="middle" href="radio.htm">
<img width="100" height="12" border="0" id="Image53" name="Image53" src="linkradio.png" alt=""></a><a onmouseover="MM_swapImage('Image54','','linkcommunityr.png',1)" onmouseout="MM_swapImgRestore()" target="middle" href="community.htm">
<img width="100" height="12" border="0" id="Image54" name="Image54" src="linkcommunity.png" alt=""></a><a onmouseover="MM_swapImage('Image55','','linkhabbocontentr.png', 1)" onmouseout="MM_swapImgRestore()" target="middle" href="habbo.htm">
<img width="100" height="12" border="0" id="Image55" name="Image55" src="linkhabbocontent.png" alt=""></a><a onmouseover="MM_swapImage('Image56','','linkforumr.png',1)" onmouseout="MM_swapImgRestore()" href="#">
<img width="100" height="12" border="0" id="Image56" name="Image56" src="linkforum.png" alt=""></a><a onmouseover="MM_swapImage('Image52','','linkmediar.png',1)" onmouseout="MM_swapImgRestore()" href="#"></a></td><td colspan="2" rowspan="2">
<img width="49" height="112" border="0" alt="" id="index_r7_c4" src="index_r7_c4.png" name="index_r7_c4"></td><td>
<img width="1" height="87" border="0" alt="" src="spacer.gif"></td></tr><tr><td colspan="2">
<img width="151" height="25" border="0" alt="" id="index_r8_c6" src="index_r8_c6.png" name="index_r8_c6"></td><td>
<img width="199" height="25" border="0" alt="" id="index_r8_c9" src="index_r8_c9.png" name="index_r8_c9"></td><td>
<img width="1" height="25" border="0" alt="" src="spacer.gif"></td></tr><tr><td rowspan="6">
<img width="31" height="640" border="0" alt="" id="index_r9_c4" src="index_r9_c4.png" name="index_r9_c4"></td><td valign="top" colspan="6" rowspan="5">
<iframe width="431" scrolling="no" height="623" frameborder="0" src="home.htm" name="middle"></iframe>
Jaysir
24-11-2006, 12:37 AM
Oh and about the free domain. I already signed up there ;]
AHHHHHHHHHH lool so confusing now. i dnt tink i can help ><" sorry
Jaysir
24-11-2006, 12:44 AM
Ha its okay. I already Gave you your rep ;) thanks for the try m8
sorry about it.. it cause am tired from a hard and long day today. ive just finished of my fansite www.habbodecks.co.uk lol
redtom
24-11-2006, 12:58 AM
Just copy the code you have now, and called it template name orignal code, and then edit the other one to what you think it should be. If its messed up then just delete the file, copy the orignal again and edit one of them keep doing that untill you have what you want.
In other words: Just mess around with the code untill you get what you want but always keep a copy of the orignal. If you just get other people to do it you will never learn.
Jaysir
24-11-2006, 01:25 AM
:O thats true. Alright i'm going to really try to get this thanks Tommeh :P +Rep
www.javascriptkit.com - i found it on there under scripts
Jaysir
24-11-2006, 07:50 AM
My troubles are that the Navigation buttons were made in the coding.. so I can't just "Get rid" of them. because without them there would be nothing in the spot of the layout if you know what i mean? :S
sorry about it.. it cause am tired from a hard and long day today. ive just finished of my fansite www.habbodecks.co.uk (http://www.habbodecks.co.uk) lol
Thats not finnished.... And a hard and long day of 30mins on that ?
Jamie.
24-11-2006, 05:24 PM
Right that code you dont know where to put it goes in the:
<head></head>
tags
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2026 vBulletin Solutions Inc. All rights reserved.