1. Duplicate the links in every page. (Too much work; too hard to keep consistent, or to update)
2. Use frames. (Just a bad idea, for a few reasons.)
3. Use a server side language to include the menu on each page, such as PHP. Using include(), this is not difficult. Or, you could use SSI (server side includes), which are a bit simpler in use and don't require php, simply that SSI is enabled on your server. This is the best solution.
4. You could use an external .js file to write those links into the html, but this isn't the best option as a user without Javascript would have no access.
5. You could try a dynamic (ajax, probably) layout, where the links don't load a new page, but content into the existing page. The Ajax Tabs script in the dd library is like this.
There have been MANY topics on this subject, so search through some old threads for lots of answers.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Wouldn't AJAX have these same issues? After all, it is Javascript if I am not mistaken.Code:but this isn't the best option as a user without Javascript would have no access.
Trinithis
There are lots of options as mentioned by Daniel. Depending on you usability you can choose any.
The simplest method would be Frames, here you wouldn't have to use any scripting. Simple targetting of frames would work.
2nd, I would go for Ajax. As mentioned by Daniel, there are lots of scripts available, you can try them.
Yes, the simplest method would be frames. Here is a frameset technique that doesn't have (all) the disadvantages of frames.
Arie Molendijk.
Correct, Trinithis. However, the difference with Ajax is that it usually has a non Javascript fallback (<a href="page.htm" onclick="ajax(this.href); return false;">), and using javascript to actually set the links into each page would have NOTHING there if javascript wasn't enabled, without any possible fallback (since the idea is having them updated through the single external .js file).
Important to note: be sure to have a fallback if you do use Ajax.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
thank you for you help
s/usually has/should have/the difference with Ajax is that it usually has a non Javascript fallback (<a href="page.htm" onclick="ajax(this.href); return false;">)
Also, it's not really AJAX in the way that you're describing it, since it (probably) wouldn't need to use XML.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
Bookmarks