PDA

View Full Version : dhtml drop down menu


mwood1
04-29-2003, 06:46 AM
Hi all,

i have created an html drop down menu on a page on my site. However, i cant put this amount of code on each page as it is too large. How do i make the code external and are there any recommended sites with examples of this?

Thanks

Lisa

eddyd84
04-29-2003, 06:54 AM
You could use Server-Side Includes.
Be sure your hosting allows them first.
Give your pages a .shtml extention
and include this code in each of them
<!--#include virtual="/menu.html" -->
Be sure to change menu.html to whatever your menu page is called.
For more info check out http://httpd.apache.org/docs/howto/ssi.html

Another way would be using PHP. If your server has PHP enabled, give your pages a .php extention. Put this code:<?php
include ("menu.html");
?>
I hope this helps. :)
Peace,
Ed

scoutt
04-29-2003, 08:42 AM
depending on what format they are in you can use javascript includes.

<script language="javascript" type="text/javascript" src="file.js"></script>

mwood1
05-01-2003, 06:12 AM
Thanks. I have searched for free dhtml js menu code but cant find any. Also there seems to be the need for 3 files all of which are huge. Is there a site with a simple example on it with the html file and the js file?

Thanks

Lisa

scoutt
05-01-2003, 08:06 AM
couldn't find any free ones huh?

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

here is another

http://www.dhtmlcentral.com/projects/coolmenus/?m=10

mwood1
05-01-2003, 08:09 AM
thanks very much guys