Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:50

Yet another PATH problem


Poster: enacheandrei
Dated: Monday October 23 2006 - 11:37:34 BST

Heya.There is an archive at www3.infoiasi.ro/~enache.andrei which contains an early stage of a site I inted to create.Now the problem is that on my machine I can use the absolute paths and everything goes nicely...but I have no ideea where the web master will place my page,so absolute paths just won't do.Can I do something like:

Angry Developer:Hey!You!
Little Green Menu:Who me?
Angry Developer:Yes you!Do you know where menu_data.js is?
Little Green Menu:Yes.
Angry Developer:Well al the links that I give you are relative to where the menu_data.js is!!!

Can't i get the menu to know where it's sources are and seek the files in the "URL" attribute relative the location of the sources rather that to the current directory?

The directory structure is something like this:
E:/Some dirs here/WebPage/ <!** Menu files and index.htm is here**>
E:/Some dirs here/WebPage/Legislatie <!** Some content here**>
E:/Some dirs here/WebPage/Statistici <!** Some content here**>

Note that I don not know what "Some dirs here" are.The web master will decie where he will place it and I have to make it so that he can relocate it wich out me having to rewrite the URS's in menu_data.js.

Now for the problem.I use just relative paths.
Current dir = WebPage;
User click's on a link which openes a page in Legislatie;
Current dir = WebPage/Legislatie;
User click's on a link which (should) open a page in Statistici;
Error -- Unknown URL --- Error Because the menu is using the Current dir to work out what page I need (because I use just relative paths) instead of using the dir in which I have placed the "*.js" needed to have the menu working.
There for my question.Can I make the dir calculate paths from the dir I have placed the sources or I am stuck with using absolute paths(which I may not know).
Thx for taking the time to read sucha long post :P Have a nice day now
Btw...sry for any writing mistakes :)


Poster: John
Dated: Monday October 23 2006 - 15:28:50 BST

Code your menu using server relative addressing/paths. The Search function here will return numerous posts on this subject.


Poster: enacheandrei
Dated: Tuesday October 24 2006 - 4:34:12 BST

OK,thx...I'll see what I can find.


Poster: enacheandrei
Dated: Tuesday October 24 2006 - 4:41:09 BST

Found it.
Angry developer -> Happy developer :)
Cheers!


Poster: John
Dated: Tuesday October 24 2006 - 14:55:01 BST

Now - wasn't that easy...? :roll:

Glad you got it.


Poster: enacheandrei
Dated: Wednesday October 25 2006 - 4:46:43 BST

:P