OK, you need to move:
Code:
var anylinkmenu5={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
anylinkmenu5.items=[
["Dynamic Drive", "http://www.dynamicdrive.com/"],
["CSS Drive", "http://www.cssdrive.com/"],
["JavaScript Kit", "http://www.javascriptkit.com/"],
["Coding Forums", "http://www.codingforums.com/"],
["JavaScript Reference", "http://www.javascriptkit.com/jsref/"] //no comma following last entry!
]
from your demo.html page to your index.html page, like so:
Code:
. . . u.init("menuanchorclass");
</script>
<script type="text/javascript">
var anylinkmenu1={divclass:'anylinkmenu', inlinestyle:'width:150px; background:#FDD271', linktarget:'_new'} //First menu variable. Make sure "anylinkmenu1" is unique
anylinkmenu1.items=[
["CNN", "http://www.cnn.com/"],
["MSNBC", "http://www.msnbc.com/"],
["Google", "http://www.google.com/"],
["BBC News", "http://news.bbc.co.uk"] //no comma following last entry!
]
var anylinkmenu5={divclass:'anylinkmenu', inlinestyle:'', linktarget:''} //First menu variable. Make sure "anylinkmenu1" is a unique name!
anylinkmenu5.items=[
["Dynamic Drive", "http://www.dynamicdrive.com/"],
["CSS Drive", "http://www.cssdrive.com/"],
["JavaScript Kit", "http://www.javascriptkit.com/"],
["Coding Forums", "http://www.codingforums.com/"],
["JavaScript Reference", "http://www.javascriptkit.com/jsref/"] //no comma following last entry!
]
</script>
</head>
<body>
<div><a href="#" onclick="new loadXmlHttp('demo.html', 'tobeupdated');return false;">UPDATE DIV</a><br/><br/></div>
<div id="tobeupdated">
<a href="http://www.dynamicdrive.com" class="menuanchorclass" rel="anylinkmenu1[click]" rev="lr">Right dropping menu</a>
</div>
</body>
</html>
Also note the return false for the AJAX call, this is a fine point, but without it, some browsers may reload the page. We wouldn't want that.
Bookmarks