Paths relative to root

Hey Kirupa Forum-goers…

I have a quick question that actually takes a few seconds to explain…

My site is being structure with multiple subfolders. And basically, the subfolders are all you need to enter, instead of ending up at a *.html or *.php file. The server automatically takes you to the index.php file in any given folder without the user having to know about it.

I’ve run into the complication with this kind of structure, however. I now have folders which are at different depths from the root. But my JavaScript dropdown menu has to get to the files in relationship to the root… How can I link that?

Must I put a bunch of …/…/…/…/ and so on in the links to make sure it goes back to the root, or is there a simpler and/or cleaner way to do this?

Thanks!