The website already had a javascript menu. In amending the site, I moved some files into directories. So now my file structure looks like this:
index.html
menu.js
bags/carrybags.html
etc.
The html pages include the following code:
<script language="JavaScript" src="../menu.js"></script>
The menu.js has code like this:
document.write('<tr><form action="index.html"><td>');
document.write('<input type="submit" value=" Home " onmouseover="this.className=\'buttonon\'" onmouseout="this.className=\'button\'" class="button"><br>');
document.write('</td></form><form action="../bags/carrybags.html"><td>');
document.write('<input type="submit" value=" Bags " onmouseover="this.className=\'buttonon\'" onmouseout="this.className=\'button\'" class="button"><br>');
While testing this script, it just breaks going between folder levels. If I start by previewing the index.html page then other pages within that level will load. But it won't go up a level - or if it does, then it won't come back down. So I have 4 menu items in the root and five menu items leading to five different folders. It worked find when everything was in the same folder. I have tried all sorts of alternatives with/without preceding dots and dashes and even tried \.\. but nothing works. It should be just a simple relative path, shouldn't it? The site is not online yet.
Your suggestions/help would be greatly appreciated.
index.html
menu.js
bags/carrybags.html
etc.
The html pages include the following code:
<script language="JavaScript" src="../menu.js"></script>
The menu.js has code like this:
document.write('<tr><form action="index.html"><td>');
document.write('<input type="submit" value=" Home " onmouseover="this.className=\'buttonon\'" onmouseout="this.className=\'button\'" class="button"><br>');
document.write('</td></form><form action="../bags/carrybags.html"><td>');
document.write('<input type="submit" value=" Bags " onmouseover="this.className=\'buttonon\'" onmouseout="this.className=\'button\'" class="button"><br>');
While testing this script, it just breaks going between folder levels. If I start by previewing the index.html page then other pages within that level will load. But it won't go up a level - or if it does, then it won't come back down. So I have 4 menu items in the root and five menu items leading to five different folders. It worked find when everything was in the same folder. I have tried all sorts of alternatives with/without preceding dots and dashes and even tried \.\. but nothing works. It should be just a simple relative path, shouldn't it? The site is not online yet.
Your suggestions/help would be greatly appreciated.