OK! I gave it away in the title.
What I have is a java script that is the floating top menu for the site.
Instead of putting all that code on each page I want to have it on one page and just use a little code to import it on all the other pages.
I just did this with the header & footer in php but this page is a .js and I don't know how to tell the pages how to link to it.
It is after midnight & I have school in the morning & need to get up at 05:00 so I'll check responses by E-Mail.
Thanks in advance.
PLEASE don't forget that I am just a student and VERY new at this.
Just to let you know this script is now being used on this page:
This is the page that I am working on to create a new site because the old site was created with (don't gag now) FrontPage.
I have a few problems:
#1 when I loaded the script on the page it showed an error on line 3
#2 w3schools has this notice:
Note: External script cannot contain the <script></script> tags!
To use an external script, point to the .js file in the "src" attribute of the <script> tag:
My code on the page is:
Here is the code on menu.js
Not sure what you are saying here.
Are you saying that I should remove just the
codes or are you saying to remove the entire style and put that on the CSS page?
As you can see by looking at the script (below) there are two (2) styles listed.
Remove the entire style and no need of
tags in js file
I have tried many things and that was one.
Nothing seems to be working so I am going to change things around and put in a sidebar with links instead.
It's unfortunate because I use that menu on other sites and it works really well.
When I install it on the page and check it with w3code checker I get all kinds of errors anyways - even though it works beautifully.
The more I go to school the more I will learn and one day I will redo the site once more.
Thanks for your time anyways.
you can them import them with a single line of code in each html file you want.
Daitken, if you really want to learn this stuff, learn to do it right, even if it takes days or weeks to understand.
I already have a CSS page for general use.
Would I need a separate CSS that would just relate back to this script then?
I mean, no biggie I can do it. I'm just wondering if that is what you are talking about.
When I come home from school or this weekend (homework first you know) I will try your idea.
I really appreciate all the help I am getting with this problem.
I may be a little thick but that just comes with old age and that I am new at all this.
However, I am learning and it's fun!
If anyone wants to see the site here is the original I made two months ago for my better half: http://www.terri-lizardlady.com
Here is the new test site I am working/learning on: http://www.terri-lizardlady.com/test/blank_template.php