A collection of experiments, please have a look around.

Experiments

Every now and again I experiment with code and technical-type things. The results I release from my mysterious underground labratory are shown below. Please take a look, you might find something useful.

Output an HTML data table in PHP easily

Datatable class

I've been experimenting with object-oriented programming recently, and created this little PHP class to help me output HTML tables with data in for my projectGenie system. It does a few clever things, like allow you to apply attributes to rows, it automatically pads empty columns to the end of the row, and allows you to format fields using a simple syntax. And here is is, for you to share and enjoy.

Refresh parts of your page with JavaScript

Refresher function

If you're brain is melting with the number of AJAX frameworks, here's another one. However this does one very simple thing; reloads any element in your page. And it does it in a very nifty way by using the Document Object Model and a specially-crafted IP attribute to specify the refresher options, therefore without mucking up your lovely clean HTML.

Check if you can use clean URLs

Clean URL Capability Checker

Down with querystrings! Hide your pages! Validate input with regular expressions! If that sounds like the cry of your heart, take a look at this.

JavaScript zoom boxes

Zoom Boxes

Unobtrusive JavaScript - that's what keeps me awake at night. That and the thought there's a spider crawling on the ceiling above me. Anyway, have a look at this little demo.

Image replacement engine

AIRE - automatic image replacement engine

Jagged edges on larger-sized HTML text can be a real problem, so for a while now people have been replacing textual headings with images which can be smooth-edged. I found it a bit of a pain to have to create these images for every text heading that needed it, so I wrote this little PHP function that automatically creates the image in any TrueType font, with any text and background colour (including transparent backgrounds) and saves them for future use. It even writes CSS that will leave the original HTML text available for text-only website viewers. Take a look.