View Full Version : External Html file for menu
Ever1234
12-16-2001, 04:49 PM
I am changing my site menu alot, can someone give me some code for a page (or js file) to link for a menu?
_mrkite
12-16-2001, 05:04 PM
Could you make that a bit clearer? :confused:
Ever1234
12-16-2001, 05:18 PM
sorry, I want an external js file that will contain all of the links for my text menu. Each page has a really small bit of JavaScript in it to link to that file.
How is it done?
Originally posted by Ever1234
sorry, I want an external js file that will contain all of the links for my text menu. Each page has a really small bit of JavaScript in it to link to that file.
How is it done? Follow these steps:
1. write the menu code in javascript
2. save that file as a .js extension
3. open up your html page
4. insert this code:
<script language="javascript" src="menu.js"></script>
Ever1234
12-16-2001, 09:46 PM
I did that, and it didnt work, my site is at http://www.mastermind.iwebland.com
my js file is being included here
_mrkite
12-16-2001, 10:06 PM
Sorry, could be me, but still :confused: :confused: :confused:
If you have the time (or the inclination) explain exactly what you want to do.
Just took a gander at that .js file, and - all you put in a .js file is Javascript; skip the commenting out, and definately the *HTML*. Plus, you've got whitespace in those write strings, always a bad idea. Again, if you describe exactly what you want to do, as opposed to how you intend to do it, various solutions may become clear.
Hmmm..you've also got a script in there, before your DOCTYPE declaration. Before anything. Oops...
Ever1234
12-17-2001, 02:53 PM
that script before the doctype (I assume on my page) was put there by the host for their ad.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.