JavaScript.CoolDev.Com Support Forums

Any questions related to JavaScript menu and JavaScript tree menu by Javascript.CoolDev.Com

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Relative URL linking

 
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu
Author Message
ESBertrand



Joined: 30 Jun 2003
Posts: 1

PostPosted: Mon Jun 30, 2003 1:38 am    Post subject: Relative URL linking Reply with quote

Hi All. Awesome menu system, very flexible!

I do have one challenge at the moment, though. Forgive me if this question has been asked before, but I cannot see anything about it in the FAQs or past posts.

I would like to use just one .js file for the menu items and include that file among all pages on my site. Currently the menu is displaying fine (I had to pass in the relative location of the "MenuB.gif" file to ensure it is read correctly). However, in lower levels of the directory structure the menu links are not working. Can I use absolute URLs but without having to include the full "http://www.site.com/...."? I'd like to just use a URL parameter like the following:

"URL":"/topdir/subdir/page.html"

Possible at all? Thanks for your help.

Erik Bertrand
Back to top
Sergey Nosenko
Developer


Joined: 19 Jan 2003
Posts: 75

PostPosted: Tue Jul 01, 2003 6:38 pm    Post subject: Reply with quote

Of course, possible.
There is no special adjustment of url attribute. If you define item as: {code:"Item 1", url:"/absolute/path/to/page/"} you will have html result <a href="/absolute/path/to/page/">Item 1</a>
Back to top
Guest






PostPosted: Tue Jul 01, 2003 7:20 pm    Post subject: Absolutes go from the ROOT Reply with quote

Thanks for the reply, Sergey.

I realized that I wasn't giving the full absolute path, or the one from the root. Once I started doing that things began to work OK. So I'm a little embarassed anyway... Embarassed

Take care all.

Erik[/b]
Back to top
Display posts from previous:   
Post new topic   Reply to topic    JavaScript.CoolDev.Com Forum Index -> COOLjsMenu All times are GMT
Page 1 of 1