Jump to content

Anylink Drop Down Menu


wetheridge

Recommended Posts

I am new to web design and had someone helping however I can not get hold of them to finish the site. Basically I am unable to get the menu's to work correctly and can't figure it out. I would appreciate some help on figuring out why this code does not work. I am using Frontpage as my editor and I am listing the code below. Someone please explain what I am doing wrong.

 

Wayne

 

<html>

<head>

<title>Diversified Investigative Associates</title>

 

 

<!--

####################################################################

################ start of the drop down menu script ################

####################################################################

-->

<script type="text/javascript">

 

/***********************************************

* AnyLink Drop Down Menu- Dynamic Drive (www.dynamicdrive.com)

* This notice MUST stay intact for legal use

* Visit http://www.dynamicdrive.com/ for full source code

***********************************************/

 

//Contents for menu 1

var menu1=new Array()

 

 

//menu2 PROFESSIONAL SERVICES

var menu2=new Array()

menu2[0]='<img border="0" src="spacer.gif" height="4px" border="0"><br>'

menu2[1]='<span class="menuLinks"><a href="services/criminal_investigation.html" class="menuLinks"> Criminal Investigation</a><br></span>'

menu2[2]='<span class="menuLinks"><a href="services/computer_forensics.html" class="menuLinks"> Computer Forensics</a><br></span>'

menu2[3]='<span class="menuLinks"><a href="services/security.html" class="menuLinks"> Security</a><br></span>'

menu2[4]='<span class="menuLinks"><a href="services/adultery_infidelity.html" class="menuLinks"> Adultery & Infidelity</a><br></span>'

menu2[5]='<img border="0" src="spacer.gif" height="4px" border="0"><br>'

 

//menu3 CONTACT US

var menu3=new Array()

menu3[0]='<img border="0" src="spacer.gif" height="4px" border="0"><br>'

menu2[1]='<span class="menuLinks"><a href="services/criminal_investigation.html" class="menuLinks"> Criminal Investigation</a><br></span>'

menu3[2]='<img border="0" src="spacer.gif" height="4px" border="0"><br>'

 

//menu4 ONLINE FORMS

var menu4=new Array()

menu4[0]='<img border="0" src="spacer.gif" height="4px" border="0"><br>'

menu2[1]='<span class="menuLinks"><a href="services/criminal_investigation.html" class="menuLinks"> Criminal Investigation</a><br></span>'

menu4[2]='<img border="0" src="spacer.gif" height="4px" border="0"><br>'

 

 

 

var menuwidth='250px' //default menu width

var menubgcolor='cc9' //menu bgcolor

var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)

var hidemenu_onclick="yes" //hide menu when user clicks within menu?

 

 

/////No further editting needed

 

var ie4=document.all

var ns6=document.getElementById&&!document.all

 

if (ie4||ns6)

document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

 

function getposOffset(what, offsettype){

var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;

var parentEl=what.offsetParent;

while (parentEl!=null){

totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;

parentEl=parentEl.offsetParent;

}

return totaloffset;

}

 

 

function showhide(obj, e, visible, hidden, menuwidth){

if (ie4||ns6)

dropmenuobj.style.left=dropmenuobj.style.top=-500

if (menuwidth!=""){

dropmenuobj.widthobj=dropmenuobj.style

dropmenuobj.widthobj.width=menuwidth

}

if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")

obj.visibility=visible

else if (e.type=="click")

obj.visibility=hidden

}

 

function iecompattest(){

return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body

}

 

function clearbrowseredge(obj, whichedge){

var edgeoffset=0

if (whichedge=="rightedge"){

var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15

dropmenuobj.contentmeasure=dropmenuobj.offsetWidth

if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)

edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth

}

else{

var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18

dropmenuobj.contentmeasure=dropmenuobj.offsetHeight

if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)

edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight

}

return edgeoffset

}

 

function populatemenu(what){

if (ie4||ns6)

dropmenuobj.innerHTML=what.join("")

}

 

 

function dropdownmenu(obj, e, menucontents, menuwidth){

if (window.event) event.cancelBubble=true

else if (e.stopPropagation) e.stopPropagation()

clearhidemenu()

dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv

populatemenu(menucontents)

 

if (ie4||ns6){

showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)

dropmenuobj.x=getposOffset(obj, "left")

dropmenuobj.y=getposOffset(obj, "top")

dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"

dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"

}

 

return clickreturnvalue()

}

 

function clickreturnvalue(){

if (ie4||ns6) return false

else return true

}

 

function contains_ns6(a, B) {

while (b.parentNode)

if ((b = b.parentNode) == a)

return true;

return false;

}

 

function dynamichide(e){

if (ie4&&!dropmenuobj.contains(e.toElement))

delayhidemenu()

else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))

delayhidemenu()

}

 

function hidemenu(e){

if (typeof dropmenuobj!="undefined"){

if (ie4||ns6)

dropmenuobj.style.visibility="hidden"

}

}

 

function delayhidemenu(){

if (ie4||ns6)

delayhide=setTimeout("hidemenu()",disappeardelay)

}

 

function clearhidemenu(){

if (typeof delayhide!="undefined")

clearTimeout(delayhide)

}

 

if (hidemenu_onclick=="yes")

document.onclick=hidemenu

 

</script>

 

<!--

####################################################################

################# end of the drop down menu script #################

####################################################################

-->

 

 

<!--

####################################################################

################ start of the page header & menu ###################

####################################################################

-->

 

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<LINK REL=StyleSheet HREF="stylepage.css" TYPE="text/css" MEDIA=screen></head>

<body bgcolor="#000000" background="bg.jpg" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<center>

<!-- Save for Web Slices (Wayne.psd) -->

<table id="Table_01" width="1112" height="262" border="0" cellpadding="0" cellspacing="0">

<tr>

<td colspan="5" rowspan="2">

<img border="0" src="Wayne_01.jpg" width="472" height="67" alt=""></td>

<td colspan="8">

<img border="0" src="Wayne_02.jpg" width="611" height="66" alt=""></td>

<td rowspan="6">

<img border="0" src="Wayne_03.jpg" width="28" height="261" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="1" height="66" alt=""></td>

</tr>

<tr>

<td colspan="8" rowspan="2">

<img border="0" src="Wayne_04.jpg" width="611" height="110" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="1" height="1" alt=""></td>

</tr>

<tr>

<td rowspan="4">

<img border="0" src="Wayne_05.jpg" width="33" height="194" alt=""></td>

<td colspan="2" rowspan="2">

<img border="0" src="Wayne_06.jpg" width="172" height="157" alt=""></td>

<td colspan="2" rowspan="2">

<img border="0" src="Wayne_07.jpg" width="267" height="157" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="1" height="109" alt=""></td>

</tr>

<tr>

<td>

<img border="0" src="Wayne_08.jpg" width="30" height="48" alt=""></td>

<td colspan="6" rowspan="2">

<img border="0" src="Wayne_09.jpg" width="524" height="50" alt=""></td>

<td>

<img border="0" src="Wayne_10.jpg" width="57" height="48" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="1" height="48" alt=""></td>

</tr>

<tr>

<td colspan="5">

<img border="0" src="Wayne_11.jpg" width="469" height="2" alt=""></td>

<td rowspan="2">

<img border="0" src="Wayne_12.jpg" width="57" height="37" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="1" height="2" alt=""></td>

</tr>

<tr>

<td>

<img border="0" src="Wayne_13.jpg" width="91" height="35" alt=""></td>

<td>

<a href="default.html">

<img border="0" src="Wayne_14.jpg" width="81" height="35" alt=""></a></td>

<td>

<img border="0" src="Wayne_15.jpg" width="128" height="35" alt=""></td>

<td colspan="3">

<!-- PROF SERVICES IMAGE -->

<a href="service/default.htm" onClick="return clickreturnvalue()"

onMouseover="dropdownmenu(this, event, menu2, '250px')"

onMouseout="delayhidemenu()" style="text-decoration:none;">

<img border="0" src="Wayne_16.jpg" width="190" height="35" alt="" align="bottom"></a>

</td>

<td>

<img border="0" src="Wayne_17.jpg" width="116" height="35" alt=""></td>

<td>

<!-- CONTACT IMAGE -->

<a href="service/default.htm" onClick="return clickreturnvalue()"

onMouseover="dropdownmenu(this, event, menu3, '250px')"

onMouseout="delayhidemenu()" style="text-decoration:none;">

<img border="0" src="Wayne_18.jpg" width="116" height="35" alt="" align="bottom"></a>

</td>

 

<td>

 

<img border="0" src="Wayne_19.jpg" width="109" height="35" alt="" align="bottom"></td>

<td>

<!-- ONLINE FORMS IMAGE -->

<a href="service/default.htm" onClick="return clickreturnvalue()"

onMouseover="dropdownmenu(this, event, menu4, '250px')"

onMouseout="delayhidemenu()" style="text-decoration:none;">

<img border="0" src="Wayne_20.jpg" width="139" height="35" alt="" align="bottom"></a></td>

<td>

<img border="0" src="Wayne_21.jpg" width="23" height="35" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="1" height="35" alt=""></td>

</tr>

<tr>

<td>

<img border="0" src="spacer.gif" width="33" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="91" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="81" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="128" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="139" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="30" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="21" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="116" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="116" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="109" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="139" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="23" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="57" height="1" alt=""></td>

<td>

<img border="0" src="spacer.gif" width="28" height="1" alt=""></td>

<td></td>

</tr>

</table>

</center>

<!-- End Save for Web Slices -->

 

<!--

####################################################################

################# end of the page header & menu ####################

####################################################################

-->

 

 

<center>

<img border="0" src="spacer.gif" height="15px"><br />

<table width="1000">

<tr><td width="700" valign="top">

<br />

<br />

<br />

<!--

####################################################################

################ start of the body ###################

####################################################################

-->

 

<h2>Welcome to Diversified Investigative Associates</h2>

 

<p>Diversified Investigative Associates was founded in June of 2009 and is located in Southern Maine. We are a full service private investigative agency providing attorneys, insurance companies, governmental agencies, corporations, small businesses and private clients with professional, confidential investigations throughout the State of Maine and nationwide.</p>

 

<p>With more than thirteen years of law enforcement experience we possess the experience, technique and skills to develop and implement an investigative plan. for determining all the details surrounding a case. With the help of our research services, our investigators will locate and interview any witnesses in the case to obtain written statements, visit the crime scene, and investigate the case on your behalf.</p>

 

<p>We specialize in surveillance, background investigations, employment background and defense investigations. As experienced private investigators, we are committed to providing a high standard of excellence to each and every one of our clients, no matter how large or small their investigation. </p>

<br />

 

<!--

####################################################################

################ end of the body ###################

####################################################################

--></td>

<td valign="top">

<!--

####################################################################

############## start of the right side ##############

####################################################################

-->

<center><span class="sans">

WAYNE E. ETHERIDGE<br />

<span style="font-size:12pt"><i>Investigator</i></span><br />

<br />

6 Killock Dr.<br />

East Waterboro, ME 04030<br />

(207) 809-4139<br />

</span>

</center>

<br />

<center><table width="290" cellpadding='15'>

<tr><td class="box">

PROFESSIONAL, DISCREET, AFFORDABLE, TIMELY :<ul>

<li>Background & Activity Checks

<li>Criminal Investigation

<li>Computer Forensics

<li>Security

<li>Adultery & Infidelity

</ul>

</td></tr>

</table></center>

 

 

<!--

####################################################################

############## end of the right side ##############

####################################################################

--></td>

</tr></table>

</center>

</body>

</html>

Link to comment
Share on other sites

Oh my - this is one pile of scary-looking code. No doctype, a bunch of inline styling, tables for layout, many, many spacer gifs, deprecated tags - that probably has nothing to do with your dropdown not working, but still - there's a lot of room for improvement.

 

The best way for us to check into what is going on is if you post a link to your site. Got one?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...