I have found several posts about this topic, but unfortunately none that work (probably because I'm missing something).
My page includes the following:
<footer>
<script type="text/javascript" src="/js/footer.js"></script>
</footer>
footer.js will have a hash with the names and targets of some links, then loop over the hash and create the list with this data and insert it into the document. The reason for the external JS file is that it will be used on every page in the site.
This post seems to be similar: How can I dynamically create an unordered list in JavaScript?
But when I tried the posted solutions I got no output in the browser.
I'm willing to use an existing script to create a menu if I don't have to actually write out the HTML of the list in the page (i.e. if I can create the structure of the list in footer.js and then use another script on it, like tinynav.js).
document.write(list), the contents will show up, but the list data doesn't.