The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Off-Topic (https://www.pokecommunity.com/forumdisplay.php?f=23)
-   -   Does... (https://www.pokecommunity.com/showthread.php?t=9727)

Imakuni? May 30th, 2004 11:50 AM

Does...
 
Does anyone know how i can add a menu like the menu on the left side of ppn?
i wanna spice up my layout.

Simone May 30th, 2004 1:05 PM

Try google.com and searching "Drop down menus". I often have wondered how he did that. I could figure it out but i don't.... Wait.. grr ok i will take a look for you *runs off to code something*... BRB

aRedMoon May 30th, 2004 2:55 PM

Roll-out might be a better search term...

Take a look at PPN's source code perhaps?

Jess May 30th, 2004 3:16 PM

Quote:

Originally Posted by JKaizer
Roll-out might be a better search term...

Take a look at PPN's source code perhaps?

Yeah..

Right click and view source.. And if your Still confused download:
Dreamweaver or Microsoft Frontpage.. Then edit it into your layout ^_^

Imakuni? May 30th, 2004 3:23 PM

ok i got the code. im gonna recode my layout THaNKELS

Geometric-sama May 30th, 2004 4:21 PM

Be careful though, if Steve wrote the code himself then you don't have the right to use it without permission. (I learnt that stuff the hard way XD)

Imakuni? May 30th, 2004 4:25 PM

im not using his code or pics. im recoding it my self. i just studied that code and used some code that i found on google.com

Geometric-sama May 30th, 2004 4:27 PM

OK, that's fine then. There are several similar scripts on script repositories too, if I recall correctly.

Imakuni? May 30th, 2004 4:52 PM

this is a remix of two scripts

Geometric-sama May 30th, 2004 4:53 PM

OK, I hope it works out OK for you ^^

Imakuni? May 30th, 2004 4:56 PM

yeah. my finished layout is almost done

Geometric-sama May 30th, 2004 4:59 PM

OK! I'll check it out when it's done. I hope you fixed the colours...

aRedMoon May 30th, 2004 5:07 PM

Errr, you got a preview we could see?

And would you be willing to share the code?

Imakuni? May 30th, 2004 5:26 PM

well... :/ the code doesnt work... i messed it up...
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<DIV id=masterdiv>
        <TABLE height="100%" cellSpacing=0 cellPadding=0 width=144 summary="">
                <TBODY>
                <TR>
                <TD width="142" vAlign=top><DIV class=menutitle onclick="SwitchMenu('sub3')"></DIV>
                        <DIV><SPAN class=submenu id=sub5> </DIV>
<DIV id=bottom>
<div align="left">
        <TABLE id=bottom_table cellSpacing=0 cellPadding=3 width=813 align=center
border=0>
                <TBODY>
                <TR>
                        <TD width="116" align=left vAlign=bottom><DIV class=menutitle onclick="SwitchMenu('sub3')">•Site</DIV>
                                <DIV><span class="submenu" id="sub3">&gt;&gt;<a href="template.php"> Home </a><br>
&gt;&gt; <a href="<A href="mailto:[email protected]">Email">mailto:[email protected]">Email The Webbie</a><br>
&gt;&gt; <a href="template.php?id=staff">Staff</a> <br>
&gt;&gt; <a href="http://www.kyletech.us/pokemon-tns/cutenews/index.php" target="_blank">Staff Login</a> <br>
&gt;&gt; <a href="http://www.network-pokemon-tns.tk" target="_blank">Network</a> <br>
&gt;&gt; <a href="http://www.topsites-pokemon-tns.tk" target="_blank">Topsites</a><br>
                                </span></DIV>
                                <DIV></DIV>
                                <DIV class=menutitle id="sub2" onclick="SwitchMenu('sub4')">•Games</DIV>
                                <DIV></DIV>
                                <DIV><span class="submenu" id="sub4"> &gt;&gt;<a href="template.php?id=rs"> Ruby and Sapphire</a><br></DIV>
<DIV><span class="submenu" id="sub4"> &gt;&gt; <a href="template.php?id=rby">Red/Blue/Yellow</a><br></DIV>
<DIV><span class="submenu" id="sub4"> &gt;&gt; <a href="template.php?id=gsc">Gold Silver Crystal</a><br></DIV>
<DIV><span class="submenu" id="sub4"> &gt;&gt; <a href="temlpate.php?id=colloseum">Colloseum </a><br></DIV>
<DIV><span class="submenu" id="sub4"> &gt;&gt; <a href="index2.php?id=tcg">Tcg</a><a href="template.php?id=tcg"> 1 and 2 </a><br></DIV>
<DIV><span class="submenu" id="sub4"> &gt;&gt; <a href="template.php?id=stadium">Stadium 1&amp;2</a> <br>
<DIV><span class="submenu" id="sub4"> &gt;&gt; <a href="template.php?id=box">Pokemon Box </a><br></DIV>
                                </span>
                                        <DIV class=menutitle onclick="SwitchMenu('sub5')"><span class="submenu" id="sub4">•Anime</span></DIV><br>
<DIV></DIV><br>
<DIV><span class="submenu" id="sub4"> &gt;&gt;<a href="template.php?id=char">Character Guide</a><br>
                        <TD width="685" align=left vAlign=bottom>&nbsp;</TD>
                </TR>
                </TBODY>
        </TABLE>
</div>
</DIV></BODY></HTML>


heres the one i based it off of:
Code:

<head>
<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
***********************************************/

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";
}
}
}

</script>
</head>
<body>
<!-- Keep all menus within masterdiv-->
<div id="masterdiv">

<div class="menutitle" onclick="SwitchMenu('sub1')">Site Menu</div>
<span class="submenu" id="sub1">
- <a href="new.htm">What's New</a><br>
- <a href="hot.htm">What's hot</a><br>
- <a href="revised.htm">Revised Scripts</a><br>
- <a href="morezone/">More Zone</a>
</span>

<div class="menutitle" onclick="SwitchMenu('sub2')">FAQ/Help</div>
<span class="submenu" id="sub2">
- <a href="notice.htm">Usage Terms</a><br>
- <a href="faqs.htm">DHTML FAQs</a><br>
- <a href="help.htm">Scripts FAQs</a>
</span>

<div class="menutitle" onclick="SwitchMenu('sub3')">Help Forum</div>
<span class="submenu" id="sub3">
- <a href="http://www.codingforums.com">Coding Forums</a><br>
</span>

<div class="menutitle" onclick="SwitchMenu('sub4')">Cool Links</div>
<span class="submenu" id="sub4">
- <a href="http://www.javascriptkit.com">JavaScript Kit</a><br>
- <a href="http://www.freewarejava.com">Freewarejava</a><br>
- <a href="http://www.cooltext.com">Cool Text</a><br>
- <a href="http://www.google.com">Google.com</a>
</span>

<img src="about.gif" onclick="SwitchMenu('sub6')"><br>
<span class="submenu" id="sub6">
- <a href="http://www.dynamicdrive.com/link.htm">Link to DD</a><br>
- <a href="http://www.dynamicdrive.com/recommendit/">Recommend Us</a><br>
- <a href="http://www.dynamicdrive.com/contact.htm">Email Us</a><br>
</span>

</div>

</body>
</html>



aRedMoon May 30th, 2004 5:47 PM

Eh, I'll wait until you fix it, then I might use it. ;P

Imakuni? May 30th, 2004 5:49 PM

Code:

<head>
<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
***********************************************/
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";
}
}
}
</script>
</head>
<body>
<!-- Keep all menus within masterdiv-->
<div id="masterdiv">
<div class="menutitle" onclick="SwitchMenu('sub1')">
  <div align="left">&raquo;Site Menu</div>
</div>
<span class="submenu" id="sub1">
<a href="test.php">•Home</a><br>
<a href="test.php?id=dls">•Downloads</a><br>
<a href="http://www.kyletech.us/pokemon-tns/cutenews/index.php" target="_blank">•Staff Login</a><br>
<a href="test.php?id=linker">•Link to Us</a><br>
<a href="<A href="mailto:[email protected]">•Contact">mailto:[email protected]">•Contact Us </a><br>
<a href="http://www.network-pokemon-tns.tk" target="_blank">•Network</a><br>
<a href="http://www.topsites-pokemon-tns.tk" target="_blank">•Topsites</a><br>
<a href="http://pokemontns.clicdev.com/f/index.php" target="_blank">•Forums </a></span>
<div class="menutitle" onclick="SwitchMenu('sub2')">
  <div align="left">&raquo;Anime</div>
</div>
<span class="submenu" id="sub2">
<a href="test.php?id=epiguide">•</a><a href="test.php?id=epiguide">Episode Guide</a> <br>
<a href="test.php?id=char">•Character Guide </a><br>
<a href="test.php?id=banned">•Banned Episodes</a><br>
<a href="test.php?id=air">•Airing Times</a></span>
<div class="menutitle" onclick="SwitchMenu('sub3')">
  <div align="left">&raquo;Games</div>
</div>
<span class="submenu" id="sub3"><a href="test.php?id=rs">•Ruby/Sapphire</a><br>
<a href="test.php?id=gsc">•Gold/Silver/<br>
Crystal</a><br>
<a href="test.php?id=rby">•Red/Blue/<br>
Yellow<br>
</a> <a href="test.php?id=sta">•Stadium 1&amp;2 </a><br>
<a href="test.php?id=collo">•Colloseum</a><br>
<a href="test.php?id=tcg">•TCG 1&amp;2 </a><br>
<a href="test.php?id=glist">•Games List</a><br>
</span>
<div class="menutitle" onclick="SwitchMenu('sub4')">
  <div align="left">&raquo;Fans</div>
</div>
<span class="submenu" id="sub4">
<a href="test.php?id=php">•Fan Art</a><br>
<a href="test.php?id=art">•My Art</a><br>
<a href="test.php?id=lamo">•Lame Emails<br>
</a><a href="test.php?id=fanmail">•Fan Mail </a><a href="test.php?id=lamo"></a><br>
</span>
<div class="menutitle" onclick="SwitchMenu('sub5')">
  <div align="left">&raquo;Webmasters</div>
</div>
<span class="submenu" id="sub5"><a href="test.php?id=php">•Php Includes</a><br>
<a href="test.php?id=scripts">•Php Scripts </a><br>
<a href="test.php?id=free">• Web Resources </a><br>
<a href="http://www.freesql.org" target="_blank">•Free Sql<br>
Database </a><br>
<a href="test.php?id=redir">•Redirection</a><br>
</span>
</div>
</body>
</html>


is the code i use

Simone May 30th, 2004 6:02 PM

Ahh thnx Imakuni?.. I could use that maybe another day or something ^^'' That will be a big help for people.

Kipkip May 30th, 2004 6:12 PM

Try replacing this:
Code:

<DIV class=menutitle onclick="SwitchMenu('sub3')">


with this:
Code:

<DIV class="menutitle" onclick="SwitchMenu('sub3')">


You forgot the quotes around menutitle.

Imakuni? May 30th, 2004 6:13 PM

was that a hint of saracasm simone? ;)

aRedMoon May 30th, 2004 6:16 PM

I don't think so...

So does the recent script one work? oO;

Imakuni? May 30th, 2004 6:36 PM

this one works
Code:

<head>
<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
***********************************************/

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";
}
}
}

</script>
</head>
<body>
<!-- Keep all menus within masterdiv-->
<div id="masterdiv">

<div class="menutitle" onclick="SwitchMenu('sub1')">Site Menu</div>
<span class="submenu" id="sub1">
- <a href="new.htm">What's New</a><br>
- <a href="hot.htm">What's hot</a><br>
- <a href="revised.htm">Revised Scripts</a><br>
- <a href="morezone/">More Zone</a>
</span>

<div class="menutitle" onclick="SwitchMenu('sub2')">FAQ/Help</div>
<span class="submenu" id="sub2">
- <a href="notice.htm">Usage Terms</a><br>
- <a href="faqs.htm">DHTML FAQs</a><br>
- <a href="help.htm">Scripts FAQs</a>
</span>

<div class="menutitle" onclick="SwitchMenu('sub3')">Help Forum</div>
<span class="submenu" id="sub3">
- <a href="http://www.codingforums.com">Coding Forums</a><br>
</span>

<div class="menutitle" onclick="SwitchMenu('sub4')">Cool Links</div>
<span class="submenu" id="sub4">
- <a href="http://www.javascriptkit.com">JavaScript Kit</a><br>
- <a href="http://www.freewarejava.com">Freewarejava</a><br>
- <a href="http://www.cooltext.com">Cool Text</a><br>
- <a href="http://www.google.com">Google.com</a>
</span>

<img src="about.gif" onclick="SwitchMenu('sub6')"><br>
<span class="submenu" id="sub6">
- <a href="http://www.dynamicdrive.com/link.htm">Link to DD</a><br>
- <a href="http://www.dynamicdrive.com/recommendit/">Recommend Us</a><br>
- <a href="http://www.dynamicdrive.com/contact.htm">Email Us</a><br>
</span>

</div>

</body>
</html>


http://www.kyletech.us/pokemon-tns/template.php
is a rough draft of the fixed layout. can you help me fix the part where it doesnt line up right
feel free to look at the source

aRedMoon May 30th, 2004 6:47 PM

Taking a wild guess, but maybe a valign="top" in the <td> would help?

Imakuni? May 30th, 2004 6:52 PM

nope it didnt... ne thing else?

Geometric-sama May 30th, 2004 6:53 PM

Yeah, you should be right after setting the valign. Always one of the first tags I set ^^

aRedMoon May 30th, 2004 7:12 PM

I dunno if the valign didn't work... oO;

*thinks for a bit*


All times are GMT -8. The time now is 6:06 PM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.