An ASPAjaxWikiBlog Thingy

March 7, 2006

Back buttons in AJAX

Filed under: General

Any AJAX Application, which does not reload the page will cause grief to the poor user who clicks their back button:

  1. They expect the last state to appear
  2. They won’t even be on the current page anymore

The workaround for this is to use several very clever tricks (1 for each browser) to provide a history path. The main aspects are:

  1. Using a hidden IFrame to "fool2 the browser into generating a history
  2. Saving state in the page’s hash (#) or fragment anchor
  3. Reading the state from the hash and updating accordingly

It’s all rather complicated under the hood but luckily there’s such a thing as the Really Simple History which hides the complexity and provides all you need for most cool browsers.

You still need to call it’s dhtmlHistory.add() method each time your app changes state and remember to add your own listener for catching history changes by the user -> dhtmlHistory.addListener(myFunc).

March 1, 2006

What’s this about an ASPAjaxWikiBlog Thingy?

Filed under: General

Um, it’s like a cool web application I made (codename TagMe) which tries to offer the functionality of a Blog and a Wiki of course using all the latest technology buzzwords:

  • AJAX
  • Wiki
  • Blog
  • Tagging
  • erm ASP?

It’s work in progress and I want people to download it, use it and provide feedback.

The system runs on any ASP-capable server (like IIS) and uses Microsoft SQL Server as a database. I’m sure it would work with MS Access too.

The database is nothing fancy and consists of 2 tables (data and tag).

The ASP side is also simple and consists of 3 pages:

  1. admin.asp -  The page for authors to edit their wiki/blog posts
  2. index.asp - The page for visitors to view the wiki/blog posts
  3. tagme.asp - The server side proxy for putting the "X" in AJAX

The client side functionality is in 4 scripts:

  1. tagme.js - The main functionality of managing and viewing posts
  2. ajax.jsl - Handles the communication with the server (tagme.asp)
  3. dhtml.js - Some basic DHTML functions
  4. dhtmlHistory.js - A cool library (aka. TSH) for managing back button behaviour in AJAX apps
The app is tested in FireFox 1.5 and IE6 and that’s good enough for me.

Get free blog up and running in minutes with Blogsome
Theme designed by Jay of onefinejay.com