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:40

FP, SHared Borders, and Sub Folders....


Poster: kelemvor
Dated: Friday February 27 2004 - 19:07:49 GMT

I use FP 2002 for my website and use the Shared Borders functionality. I have the Vertical menu in the Left border and everything works just fine.

However at first I put all 4 of rhe JS files in the _borders folder since that's where the file for the Left Border is but that didn't work. I then put all 3 of them (not the menu_data.js file) into the root folder where all the actual html file are and that made it work.

However, when I create a web page in that web using the same shared borders but same that file into a subfolder, it then doesn't work right.

Is there any way I cna put all the files in the _borders folder so they will work on every page and the links will start off the root folder and not the current folder of the page?

Thanks.


Poster: kelemvor
Dated: Monday March 1 2004 - 2:32:17 GMT

No responses all weekend. ANyone have any experience with this?


Poster: John
Dated: Monday March 1 2004 - 14:52:59 GMT

Use what's called server-relative addressing. However, I must point out, extreme care is needed with FP, as horror stories abound about it re-writing code behind your back (personal experience included, long ago when I was forced to use it).

Let's say your site is located at http://www.kelemvor.com/. You mentioned putting all the JS files in the _border folder. Assuming that is a root level folder, the JS calls to the code would look like this...
Code:
<script language="JavaScript" src="/_border/milonic_src.js" type="text/javascript"></script>   
<script language="JavaScript">
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/_border/mmenuns4.js><\/scr"+"ipt>");      
else _d.write("<scr"+"ipt language=JavaScript src=/_border/mmenudom.js><\/scr"+"ipt>");
</script>
<script language="JavaScript" src="/_border/menu_data.js" type="text/javascript"></script>

This will allow calling the code from any level without alteration (use an include).

I was doing this.


Poster: doodleelephant
Dated: Monday March 1 2004 - 17:31:56 GMT

I was using FP2000 for quite some time w/ shared borders and the Milonic Menus.
The problems I had were generally that when FP appied my shared border it would not change the relative URI as well. My solution to make it point to the JavaScript files in my _borders folder was to use an absolute URI.
eg insetad of using "../_borders/menu_data.js" I used "http://www.mysite.com/_borders/menu_data.js"
This absolute pointing forces FP to ignore the address, as it sees it as an external link, and then you can apply it to your border without worrying.

:idea: However, I have recently found a better solution to FP borders. It works a whole lot better. I will be using PHP Templates in Dreamweaver MX 2004 to apply this kind of thing to my site. I would suggest a change. Believe me, you learn to love it after a few hours of using it. It's a heck of a lot better. (I just copied the code from the FP created pages and edited it, cleaned it up, and it works well for me.) Anyway, I'll stop blabbing about dreamweaver, and let you use FP. I know that Dreamweaver is quite cost prohibitive.

Enjoy,
Doodleelephant