View Full Version : Help with Drop down menu

05-25-2007, 10:14 AM
1) Script Title:
HV Menu (http://www.dynamicdrive.com/dynamicindex1/hvmenu/index.htm)

2) Script URL (on DD):

3) Describe problem:

I don't think this problem only applies to this script but what I need to know is:

If i am creating a link within a javascript; how do I make it relative?

e.g. I want to use
"../index.html" rather than having to use "http://www.mydomain.com/index.html"

I know this works but only for certain pages in the same directory as soon as I call the script from a page in another directory it doesn't work.
Can the link be made relative to the JS document itself?

The reason being is that I use templates in dreamweaver so that whenever I create a new page from a template it updates the links for me.

e.g. if I put a web page in a subfolder it will automatically add ../../../ depending how many directories I need to go back. I can't seem to do the same with javascript.

Hope this makes sense.