Sunday 20 January 2013

Distracted by Computer Code

I've been neglecting this blog to the extent that this is my first entry of the year.

I have been distracted by websites - my own and that of the Leicester U3A.

The problem was handling the menus. Originally each page had its own menu - very tiresome when I had to edit every page on the site to change the menu.

A few years ago I devised what has come to seem a distinctly Heath Robinson arrangement using frames and JavaScript to weld a single menu file onto whatever page was being viewed. Not only was it clumsy, but it behaved oddly. The refresh command took one back to the page one originally logged onto, not to the page one was viewing at the time.

A few weeks ago I investigated php, in particular the include command, and after pottering about for a while got it working. I then had to resolve competing styles, those used on the main pages and those needed by the menu, but today I got it all working, with considerably simpler code than I had before.

I'm so happy I don't mind even the snow !!




No comments :