Coding Samples

A list of code samples !

This is a depository of coding samples in my quest to learn as much as possible.

This file was last modified on: 1/23/2007 11:02:06 PM

XSLT/XML Samples

XSLT Photo Album A photo album generated from an XML file and transformed by XSLT.

JavaScript Samples

Various JavaScript Functions A set of different javascript functions.

Popup Links Links using unobrtrusive javascript open the link a popup browser window. The script degrades nicely through javascript checks for DOM support in your browser.

DOM Script Image Gallery Image gallery created using unobrtrusive javascript. The script degrades nicely through javascript checks for DOM support in your browser.

Equal Column Heights Script This is a good script for when you want two div columns to be equal height no matter what the content is inside. The script detects the lenght of the tallest div and makes it equal to the column with less content. Works in ALL browsers.

Select & Go Navigation (no "Go" Button)

Plugins Detector Script

DOM Manipulation Samples

Showing/Hiding without Inline Event Handlers

Showing/Hiding using DOM JavaScript You may want to cloak some of your page's content when the page loads, revealing it in response to a visitor's actions. The DOM makes it easy to show and hide content.

DOM Sniff: redirect using DOM JavaScript DOM-based scripts won't do much good for older browsers that lack support for the W3C DOM standard. This easy script will redirect those browsers to a basic supported page of your choosing.

DOM Color Changer The HTML DOM defines an HTML document as a collection of objects. Objects have properties and methods. Objects can respond to events.

innerHTML Though not actually a part of the DOM spec, this property gives the web developer enormous flexibility over the contents of a web page.

PHP examples

See PHP examples

Cascading Style Sheet (CSS) Samples

Web Standards Samples

Yahoo! Health Homepage Yahoo! Health homepage rewritten web standards compliant.

Accessibility Samples

Access Matters Website

AJAX Samples

AJAX - Fetch Text Simply reads a text file on the server using AJAX

AJAX Exploration - Dynamic Website Loader Exploration of AJAX techniques to load different websites on to a web page

Yellow Fade Technique

Google Maps Google now allows you to obtain a key to put a google map inside your website

Yellow Fade Technique This technique requires inline javascript, but is a friendly way to “highlight changes without getting in someone's way”.

Fade Anything Technique This technique does not require the use of inline javascript. You simply call it using a "class" tag. In the past few weeks, Jason Fried of 37signals' has reminded us that the “Yellow Fade Technique” (YFT), which they've implemented in such things as Basecamp and Ta-da Lists, is a friendly way to “highlight changes without getting in someone's way”.