WiseGuysOnly - The Journal of Tim Roberts

Dining out on Drag and Drop since 2006

Archive for the ‘PHP’ Category

The Vietnam War Timeline

without comments

My newly launched project, a timeline of the Vietnam War, is now online.

The project provides an interactive timeline of the conflict that allows users to scroll through years and see key events and related media in a chronological order. This is still the beta of the project insofar as the information is still being added, but contributions are expected and welcomed from veterans, historians and other with an interest in this war.

Information for the techies: the project uses jQuery to power the timeline and the backend data is stored using MySQL and delivered with PHP. The timeline degrades gracefully to allow for viewing in non-javascript devices. Future updates are to include an RSS feed of the latest added information.

The project is run and hosted voluntarily by myself.

Written by Tim

December 30th, 2008 at 6:01 pm

Drag and drop reordering of database fields (sortables) with jQuery

without comments

This tutorial explains how to display a list of items from a database that can be reordered in real time by dragging and dropping, using the jQuery library. Moreover, no page reload is required on every reorder. If you want a bigger introduction to why you may want to do this I suggest reading my tutorial on how to achieve the same functionality using scriptaculous.

Previously I have explained how to achieve this in Scriptaculous and Mootools.

Read the rest of this entry »

Written by Tim

December 7th, 2008 at 8:21 pm

Autocompletion with Scriptaculous and Ajax.

with 19 comments

Demo here | Download sample files

This tutorial supercedes my previous turtorial on autocompletion by adding further tips and tricks to make your autocompletion a much better experience for your site users The tutorial is structured in the following way:

  1. Introduction: What is autocompletion and why use it?
  2. How it works.
  3. Getting scriptaculous and building the form.
  4. Building the autocomplete server.
  5. Passing back an id to our form.

Read the rest of this entry »

Written by Tim

March 9th, 2008 at 9:40 pm

Alternating table row colours in PHP.

without comments

Recently I have been tinkering with Ruby on Rails and I came across a rather nice method of alternating row colours using only two lines of code and a couple of CSS rules. I have been using this method in my PHP ever since and never looked back. This is a neat trick to alternate row colors on a table using PHP.

Read the rest of this entry »

Written by Tim

March 9th, 2006 at 8:20 am