Ronny: Überschriften in PopUp-Menü verlinken?

Beitrag lesen

Hallo!

Folgendes Problem:
Ich habe ein PopUp-Menü, bei welchem ich auch gern die Überschriften verlinken möchte. Die Seite sollte dann in einem fremden Frame geöffnet werden. Wenn ich also draufklicke, soll zum einen das Menü aufklappen und zum anderen eine Seite geöffnet werden. Geht das? Ich habe schon ein "GoToURL"-JavaScript in den <li>-Tag eingesetzt, aber da funktionieren die Links der Unterpunkte nicht mehr.
Hier mal der Quelltext:

<html>
<head>
<title>Beispiel</title>

<style type="text/css">

body {
background-color: #E6EBF5;
margin: 0;
padding: 0px 0 0 0px;
}

ul#menu {
width: 160px;
list-style-type: square;
border-top: solid 0px #000000;
margin: 0;
padding: 0;
}

ul#menu ol {
display: none;
text-align: left;
list-style-type: disc;
margin: 0;
padding: 0px;
}

ul#menu li,
ul#menu a {
font-family: Arial;
font-size: 12px;
color: #000000;
font weight: light;
}

ul#menu li {
border-bottom: solid 0px #000000;
line-height: 15px;
}

ul#menu ol li {
border-bottom: none;
}

ul#menu ol li:before {
content: "- ";
}

ul#menu a {
text-decoration: none;
outline: none;
}

ul#menu a:hover {
color: #33333;
font weight: bold;
}

ul#menu a.active {
color: #000000;
font weight: bold;
}

</style>

<script language="javascript">

// ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
//
// Coded by Travis Beckham
// http://www.squidfingers.com | http://www.podlob.com
// If want to use this code, feel free to do so, but please leave this message intact.
//
// ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
// --- version date: 06/02/03 ---------------------------------------------------------

// ||||||||||||||||||||||||||||||||||||||||||||||||||
// Node Functions

if(!window.Node){
 var Node = {ELEMENT_NODE : 1, TEXT_NODE : 3};
}
function checkNode(node, filter){
 return (filter == null || node.nodeType == Node[filter] || node.nodeName.toUpperCase() == filter.toUpperCase());
}
function getChildren(node, filter){
 var result = new Array();
 var children = node.childNodes;
 for(var i = 0; i < children.length; i++){
  if(checkNode(children[i], filter)) result[result.length] = children[i];
 }
 return result;
}
function getChildrenByElement(node){
 return getChildren(node, "ELEMENT_NODE");
}
function getFirstChild(node, filter){
 var child;
 var children = node.childNodes;
 for(var i = 0; i < children.length; i++){
  child = children[i];
  if(checkNode(child, filter)) return child;
 }
 return null;
}
function getFirstChildByText(node){
 return getFirstChild(node, "TEXT_NODE");
}
function getNextSibling(node, filter){
 for(var sibling = node.nextSibling; sibling != null; sibling = sibling.nextSibling){
  if(checkNode(sibling, filter)) return sibling;
 }
 return null;
}
function getNextSiblingByElement(node){
 return getNextSibling(node, "ELEMENT_NODE");
}

// ||||||||||||||||||||||||||||||||||||||||||||||||||
// Menu Functions & Properties

var activeMenu = null;

function showMenu(){
 if(this == activeMenu){
  this.className = "";
  getNextSiblingByElement(this).style.display = "none";
  activeMenu = null;
 }else{
  if(activeMenu){
   activeMenu.className = "";
   getNextSiblingByElement(activeMenu).style.display = "none";
  }
  this.className = "active";
  getNextSiblingByElement(this).style.display = "block";
  activeMenu = this;
 }
}
function initMenu(){
 var menus, menu, text, a, i;
 menus = getChildrenByElement(document.getElementById("menu"));
 for(i = 0; i < menus.length; i++){
  menu = menus[i];
  text = getFirstChildByText(menu);
  a = document.createElement("a");
  menu.replaceChild(a, text);
  a.appendChild(text);
  a.href = "#";
  a.onclick = showMenu;
  a.onfocus = function(){this.blur()};
 }
}

// ||||||||||||||||||||||||||||||||||||||||||||||||||

if(document.createElement) window.onload = initMenu;

</script>

</head>

<body bgcolor="#FFFFFF" text="#000000">
<ul id="menu">
<li>Links
  <ol>
    <li><a href="link1.htm" target="inhalt">Link1</a></li>
    <li><a href="link2.htm" target="inhalt">Link2</a></li>
  </ol>
</li>
</ul>
</body>
</html>

Gruß,

Ronny