DEFINING A BASE URL

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
yes2work1
Beginner
Beginner
Posts: 8
Joined: Wed Sep 27, 2006 3:00 pm

DEFINING A BASE URL

Post by yes2work1 »

Hi

I am having problems using relative paths within our milonic installation. I have defined a global variable within menu_data.js called baseurl which contains a string which represents the base URL for the site where milonic will be used on our server.

My question is how I concatenate the contents of this baseurl variable onto the front of the URL parameters which are used to set the URL’s for each of the menu items i.e.

Code: Select all

aI("text=Staff Directory |;url=cpdocs/stafflist.htm;");
Thanks in advance



Neall McLaren
ICT Assistant


Yes2work Ltd.
The Acorn Centre
51 High Street
Grimethorpe
Barnsley
S 72 7BB


Website: http://www.yes2work.org.uk
Email: nmclaren@yes2work.org.uk
yes2work1
Beginner
Beginner
Posts: 8
Joined: Wed Sep 27, 2006 3:00 pm

Base URL

Post by yes2work1 »

Solved it using this code segment

Code: Select all

aI("text=Address / Telephone Lookup;url="+baseurl+"sites/telephoneLookup.htm;");
Not too hard really was it? just having a bad day :-)

Cheers
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

And that's the exact way to do it. Nicely done! Seems your day is improving ;)

Kevin
Post Reply