VB icon

Drop Down Menu's on Click

Submitted on: 1/2/2015 10:31:00 AM
By: Mike McNaughton (from psc cd)  
Level: Advanced
User Rating: By 16 Users
Compatibility: Java (JDK 1.2)
Views: 4386
     Advanced Code. With quite a bit of changing this code can be VERY GOOD!!! Try it, if you have a lot of knowledge in internet languages. Please go to the bottom of this page and vote for me. I would greatly appreciate it. THANK YOU!
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
// Name: Drop Down Menu's on Click
// Description:Advanced Code. With quite a bit of changing this code can be VERY GOOD!!! Try it, if you have a lot of knowledge in internet languages.
Please go to the bottom of this page and vote for me. I would greatly appreciate it. THANK YOU!
// By: Mike McNaughton (from psc cd)
// Assumes:Please go to the bottom of this page and vote for me. I would greatly appreciate it. THANK YOU!

<script language="JavaScript">
Copyright  2000 Michro. All rights reserved.
This script may be used freely as long as this message is intact! ********************************************************************************/
var stayFolded=false
var exImg=new Image(); exImg.src='images/arrow10.gif'
var unImg=new Image(); unImg.src='images/arrow1.gif'
var n = (document.layers) ? 1:0;
var ie = (document.all) ? 1:0;
var browser=((n || ie) && parseInt(navigator.appVersion)>=4) 
function makeMenu(obj,nest){
	nest=(!nest) ? '':'document.'+nest+'.'										
	this.css=(n) ? eval(nest+'document.'+obj):eval('document.all.'+obj+'.style')					
 	this.ref=(n) ? eval(nest+'document.'+obj+'.document'):eval('document');		
	this.x=(n)? this.css.left:this.css.pixelLeft;this.y=(n)? this.css.top:this.css.pixelTop;							
	this.hideIt=b_hideIt;	this.showIt=b_showIt; this.vis=b_vis; this.moveIt=b_moveIt											
	return this
function b_showIt(){this.css.visibility="visible"}
function b_hideIt(){this.css.visibility="hidden"}
function b_vis(){if(this.css.visibility=="hidden" || this.css.visibility=="hide") return true;}
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x; this.css.top=this.y}
function init(){
	oTop=new Array()
	oTop[0]=new makeMenu('divTop1','divCont')
	oTop[1]=new makeMenu('divTop2','divCont')
	oTop[2]=new makeMenu('divTop3','divCont')
	oTop[3]=new makeMenu('divTop4','divCont')
	oTop[4]=new makeMenu('divTop5','divCont')
	oTop[5]=new makeMenu('divTop6','divCont')
	oSub=new Array()
	oSub[0]=new makeMenu('divSub1','divCont.document.divTop1')
	oSub[1]=new makeMenu('divSub2','divCont.document.divTop2')
	oSub[2]=new makeMenu('divSub3','divCont.document.divTop3')
	oSub[3]=new makeMenu('divSub4','divCont.document.divTop4')
	oSub[4]=new makeMenu('divSub5','divCont.document.divTop5')
	oSub[5]=new makeMenu('divSub6','divCont.document.divTop6')
	for(i=0;i<oSub.length;i++){ oSub[i].hideIt() }
	for(i=1;i<oTop.length;i++){ oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].height) }
function menu(num){
			if(!oSub[i-1].vis()) oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].height+oSub[i-1].height) 
			else oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].height)
if(browser) onload=init;
<div id="divCont" style="width: 122; height: 211">
	<div id="divTop1" class="clTop"><a href="" onclick="menu(0); return false" class="clMain"><img src="images/arrow1.gif" name="imgA0" width=0 height=0 alt="" border="0"><IMG SRC="http://swo1.hypermart.net/_private/front.gif" width="122" height="21"></a><Br>
		<div id="divSub1" class="clSub" style="width: 63; height: 94">
<!--To change the links, replace the # with the filename or wherever you want the link to go to!-->
			 <a target="Main" href="http://swo1.hypermart.net/join.html" class="clSubb">-Join</a><Br>
			 <a target="Main" href="rules.htm" class="clSubb">-Rules</a><Br>
			 <a target="Main" href="rptips.html" class="clSubb">-Rp Tips</a><Br>
			 <a target="Main" href="begin.html" class="clSubb">-sWo Beginnings</a><Br>
			 <a target="Main" href="hardcore.html" class="clSubb">-sWo Hardcore</a><Br>
<a target="Main" href="htmlhelp.htm" class="clSubb">-sWo HTML Help</a><Br>
	<div id="divTop2" class="clTop"><a href="" onclick="menu(1); return false" class="clMain"><img src="images/arrow1.gif" name="imgA1" width=0 height=0 alt="" border="0"><IMG SRC="http://swo1.hypermart.net/_private/rp.gif" width="122" height="21"></a><Br>
		<div id="divSub2" class="clSub" style="width: 115; height: 94">
			 <a href="http://iwa-efed.hypermart.net/rpboard" target="_blank" class="clSubb">-Wed/Sat Rp Board</a><Br>
			 <a href="http://swo1.hypermart.net/cgi-bin/index.html" target="_blank" class="clSubb">-PPV Rp Board</a><Br>
			 <a href="http://members2.boardhost.com/pxroy33/" target="_blank" class="clSubb">-OOC Board</a><Br>
			 <a href="http://users3.cgiforme.com/sworpboard/cfmboard.html" target="_blank" class="clSubb">-Back Up Board</a><Br>
			 <a target="Main" href="http://swo1.hypermart.net/cgi-bin/news/index.html" class="clSubb">-News & Rumors Board</a><Br>
	<div id="divTop3" class="clTop"><a href="" onclick="menu(2); return false" class="clMain"><img src="images/arrow1.gif" name="imgA2" width=0 height=0 alt="" border="0"><IMG SRC="http://swo1.hypermart.net/_private/members.gif" width="122" height="21"></a><Br>
		<div id="divSub3" class="clSub" style="width: 122; height: 94">
			 <a target="Main" href="sworoster.htm" class="clSubb">-Roster</a><Br>
			 <a target="Main" href="titles-rankings.html" class="clSubb">-Titles and Rankings</a><Br>
			 <a target="Main" href="titlehistories.html" class="clSubb">-Title Histories</a><Br>
			 <a target="Main" href="http://swo1.hypermart.net/matchrequest.html" class="clSubb">-Sign a Match</a><Br>
			 <a target="Main" href="http://swo1.hypermart.net/sneak.html" class="clSubb">-Interfear Request</a><Br>
	<div id="divTop4" class="clTop"><a href="" onclick="menu(3); return false" class="clMain"><img src="images/arrow1.gif" name="imgA3" width=0 height=0 alt="" border="0"><IMG SRC="http://swo1.hypermart.net/_private/results.gif" width="122" height="21"></a><Br>
		<div id="divSub4" class="clSub" style="width: 122; height: 94">
			 <a target="Main" href="http://jjdermont.hypermart.net/wed.html" class="clSubb">-Wed. Revolution</a><Br>
			 <a target="Main" href="sat.html" class="clSubb">-Sat. Combat Zone</a><Br>
			 <a target="Main" href="ppv.htm" class="clSubb">-PPV</a><Br>
			 <a target="Main" href="pastppv.html" class="clSubb">-PPV Archives</a><Br>
	<div id="divTop5" class="clTop"><a href="" onclick="menu(4); return false" class="clMain"><img src="images/arrow1.gif" name="imgA4" width=0 height=0 alt="" border="0"><IMG SRC="http://swo1.hypermart.net/_private/coming.gif" width="122" height="21"></a><Br>
		<div id="divSub5" class="clSub" style="width: 122; height: 94">
	<div id="divTop6" class="clTop" style="width: 139; height: 39"><a href="" onclick="menu(5); return false" class="clMain"><img src="images/arrow1.gif" name="imgA5" width=0 height=0 alt="" border="0"><IMG SRC="http://swo1.hypermart.net/_private/coming.gif" width="122" height="21"></a><Br>
		<div id="divSub6" class="clSub" style="width: 79; height: 94">
<!--- Place all page content here --->
 <tr><!-- row 3 -->
 <tr><!-- row 4 -->
 <tr><!-- row 5 -->
 <tr><!-- row 6 -->
 <tr><!-- row 7 -->
 <tr><!-- row 8 -->
 <tr><!-- row 9 -->
 <tr><!-- row 10 -->
 <tr><!-- row 11 -->
 <tr><!-- row 12 -->
 <tr><!-- row 13 -->
 <tr><!-- row 14 -->
 <tr><!-- row 15 -->
 <tr><!-- row 16 -->
 <tr><!-- row 17 -->

Other 7 submission(s) by this author


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

 There are no comments on this submission.

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)

To post feedback, first please login.