Making navigation easier to update, using JS?
I had a bit of a go here: http://www.amythornley.co.uk/test.html
but as you can see it doesn't even load the aboutme page, any idea why? and I would still need to update every page to add a new link anyway!
Here's my website to see the sort of thing I want to do: http://www.amythornley.co.uk/
I have managed to achieve the same result using a simple php include
About the easiest way is to use a server side include. Then you have just one copy of the menu (in a separate file) and you use an include statement to pull it into each page.
That has to be enabled on the server, though.
2) the last line of that function could then be document.write(str);
Whenever you need to edit your menu, you only need to do it in 1 place - the function in your external js file.
But if you have access to server side scripting like php, then imo using include files is a better option.
Go that way dude. It's a better solution in virtually every way you can think about, IF you can do it. Most likely, you can. Don't remember the last time I could not use includes. Three years ago I think only because where I work we are still debating html 1.
yep, ageee in general - but I have had clients who only want static websites for their purposes and hence don't want to pay unnecessary extra hosting charges for server side scripting options to be enabled on their acoounts.
I think as developers we all work within constraints. Yours are 'client' centered, and mine are 'organization' centered.
Originally Posted by tirna
We only have to be honest on these boards, try to help and be respectful if folks correct our errors (I'm speaking of my errors) and interject some slight editorial comments because as developers we have to work within the parameters of the craft. Plus, whoever is in charge inevitably doesn't know what they are talking about, be it client or boss.
After that, hit a beer or two and be respectful of all folks as we hope they are with us.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)