Here’s a free way to add a simple, Ajax enabled menu to your site. I’m using iWeb, but it doesn’t matter what tool you use to publish your web pages. It just uses a simple collection of Javascripts to reference HTML files.
The Problem
Instead, I started creating a manual list of related articles, so readers could easily find similar articles on the subject. That started to get difficult to manage however; I had to manually update upwards of 30 pages every time I added a related story, and some stories were related to multiple subjects. I wanted a central way to update things.
The Solution
I thought it would be cool to include a little Javascript menu that could popup a list of related articles. As it turned out, I found something even better than a popup: a free little little Ajax menu that could display various lists of links to related articles, right on the same page.
Prior to Ajax, when a user requests information on a web page, the web browser sends the request to the server and then has to wait to receive an response. It can’t display the response, or do anything else, until it has downloaded a entirely new web page. Once it receives the page, the browser has to perform a slow and distracting page redraw.
Microsoft’s Invention, Google’s Business Plan
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
A Simple & Free way to use Ajax at home
Here’s a simply and easy way to include the magic of Ajax into your own web pages. I’m using it to display different sets of links to related stories on my site, but it can be used to do various things.
Here’s how it works: after exporting my site from iWeb, I add Turnbull’s Javascript and a link to the external htmlhttprequest.js (saved to my web server’s root directory) via search and replace to each page’s Head tag.
I then paste in a simple list of links at the bottom of each article, pointing to a directory of HTML documents. Each page contains all my page links on a specific topic.
The result: a simple “read more about” listing that expands to display a growing set of links, without reloading another directory page. Now, each time I complete a new article, I only need to add a link to the applicable HTML pages in my content directory.