Board Logo

website sub directories
ken734 - 5/12/2007 at 03:33 PM

I am very novice and have what I hope is a simple question. I have set subdomains on my website and want to use the same menu that is in the root directory on the sub directories. I don't know how to refer to the root directory in Java. I tried adding the ../ within the html and java scripts and know that doesn't work. Is there a way to refer to the root directory within Java? Would greatly appreciate any advice.

tigra - 5/12/2007 at 04:10 PM

You say you "set subdomains" and then refer to "sub directories". It's not the same. Also we deal with JavaScript which is not the same as Java. Anyway, details aside, you can refer to the root folder of the website by placing the slash at the beginning:


if refering from different domain specify the domain:

note that using the absolute paths may prevent your site from functioning from the local drive without webserver (unless root folder of the website is also the root folder of your local drive)

ken734 - 5/12/2007 at 07:46 PM

Thanks you for forcing me to think. I did have a sub domain in a subdirectory but was treating it just a subdirectory not a sub domain. I was able to get things working. I really appreciate your response even though I feel a little bit embarrassed.

Back to forum: