PDA

View Full Version : AnyLink Drop Down Menu Include Help



jrbk
05-24-2006, 07:55 PM
Hi,

I am beginning to work with the script found at the following link on dynamicdrive.com called the "AnyLink Drop Down Menu"

http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

I am new to this but this script but it's pretty easy to understand and it is exactly what I am looking for. I am using MS FrontPage 2003 to build my web.

Part of this script needs to be inserted into the head and the rest into the body. I would like to be able to create one file which contains the script for the head and one file which contains the html for the body and then "include" those files into each of the pages on my website.

I have tried this without success in a few different ways and using a few different file formats. Frontpage uses webbots to include pages and will even allow you to include them in the head, so I am told, but I can't get it to work for me.

Is there a way to do this? My host uses UNIX. Any help would be appreciated.

ddadmin
05-25-2006, 01:23 AM
This actually has less to do with Frontpage, but rather, the file type of your server. For example, if your server supports SSI, with your page extensions being something.shtml, you can use SSI to dynamically included external content onto the current. See this tutorial for more info: http://javascriptkit.com/howto/ssi.shtml

jrbk
05-25-2006, 01:24 PM
Thank you for the reply ddadmin.

My server does support SSI. I use it to include a php poll on my home page. It's pretty easy. I haven't tried it with this script yet but my assumption is that every page I want to include this script into would have to have the .shtml exetetion instead of the .htm extention. I am not sure that I want alll my pages using that extention???

Is there another way?

ddadmin
05-25-2006, 04:56 PM
If you wish your pages to be SSI enabled but don't wish to rename your pages to the .shtml extension, another option is to use the magical .htaccess file to tell the server to parse regular .htm and .html page to be SSI enabled instead. Create a blank text file, and add to it the code:


AddHandler server-parsed .html
AddHandler server-parsed .htm

Save this file as .htaccess, and upload to your root HTML directory in ASCII. Assuming your web host has .htaccess enabled, all your regular .htm and .html pages should now act just like .shtml pages.

More info here: Enabling SSI Via htaccess (http://www.javascriptkit.com/howto/htaccess4.shtml)

jrbk
05-25-2006, 05:53 PM
Cool! Thanks

I already have .htaccess in use and will just add these two lines. Thanks for the help ddadmin

jrbk
05-25-2006, 06:19 PM
cool, I have some othe questions but started a new thread with that new question found here.

http://www.dynamicdrive.com/forums/showthread.php?t=9930