Image

Imagedogleish wrote in Imagejavascript 😯confused

Drop Down Menus, javascript

I'm not very knowledgable with js at all but I'm trying. I've copied some script from a downloaded thing which works on my computer but not on the website. I can't work out what's wrong. This is a little section of it. The problem is that when I put the mouse on the Introduction title, the dropdown menu doesn't show.

Code:
<div id="menu">
<link rel="stylesheet" type="text/css" href="external.css" />

<script type="text/javascript" src="dropdown.js">
</script>

<style type="text/css">

div.sample_attach, a.sample_attach
{
  width: 100px;
  padding: 0px 5px;
  font-weight: 900;
  color: black;
}

a.sample_attach
{
  display: block;
b  border-bottom: none;
  text-decoration: none;
}

form.sample_attach
{
  position: absolute;
  visibility: hidden;
  padding: 0px 5px 2px 5px;
}

</style>

</head>
<body>

<!-- Dropdown Menu -->

<div id="menu_parent" class="sample_attach">
Introduction
</div>
<div id="menu_child" style="position: absolute; visibility: hidden;">
<a class="sample_attach" href="hereislove.php">Here is Love</a>
<a class="sample_attach" href="tasteofera.php">The Taste of our Era</a>
<a class="sample_attach" style="border-bottom: 1px solid black;" href="encompassing.php">Towards Encompassing</a>
</div>

<script type="text/javascript">
at_attach("menu_parent", "menu_child", "hover", "y", "pointer");
</script>


</body>
</html>


If anyone can help I'd be extremely grateful.


P.S. Perhaps, I've put all the coding in the wrong place. I will add more if what there is isn't sufficient.