"Save the code as menu.html and then insert that into each page of the website". If this may indeed be an option for me, then how do I insert or call the menu.html inside the page?
Most likely they're talking about using some server side feature to do this, such as SSI or PHP. But you did say your web host doesn't support either.
Come to think of it, another way would be to still save the HTML portion of th e menu as a separate file (ie: "menu.htm"), then include it using Ajax. Using this script in combination with Switch Menu, you can do this:
Code:
<link rel="stylesheet" type="text/css" href="switchmenu.css" />
<script src="switchmenu.js" type="text/javascript"></script>
<body>
<script type="text/javascript">
ajaxinclude("menu.htm")
</script>
</body>
I've attached all files involved below. Depending on the pages you'll be including the menu, you may wish to switch to an absolute reference to "menu.htm" on your server, by doing:
Code:
<script type="text/javascript">
ajaxinclude(rootdomain+"/include/menu.htm")
</script>
where rootdomain is dynamically substituted with your site's domain (don't change).
Bookmarks