Web Reference

How to do some interesting things with dynamic HTML, CSS, JavaScript, and maybe even some plain HTML.

This is a collection of little tidbits regarding web development. They come from many years of coding, so some examples are quite dated. I hope that you find some useful stuff here.

  • Color Preference - Detect a light or dark theme using just CSS.

  • Favicon - A shortcut icon or favicon is a little image that shows up in the address bar of your browser. These instructions show how to set one.

  • Geographic Navigation - By using a spinning globe, you can separate the information you have about the world into groups by continent. Spinning globe is provided by JavaScript and a series of images.

  • Mouseover Example - Swapping images with a mouseover. This also displays textual descriptions and can put a message in the status bar.

  • Including JavaScript Dynamically - If you have the desire to load JavaScript files dynamically and even know when they have loaded, this page is for you!

  • JavaScript Speed Enhancements - If you code it right and use these tips, your program will eek out the last drop of speed from the browser.

  • Lifegenesis - Conway's game of cellular automata, animated by using JavaScript to swap CSS classes. Random splatters assist in keeping things interesting.

  • Onloads and Alternatives - When you have multiple JavaScript programs that both want to start with `window.onload`? Alter them both accordingly so that they will never conflict again. Code this way for all of your `window.onload` needs and remove potential sources of trouble.

  • Passing Data To/From Popup Window - How to open a popup window and pass data back and forth with JavaScript.

  • Scoreboard - A sample scoreboard for a geocacher in my area.

  • Transparency - How to fade elements in and out. Complete with a live example and tips to avoid flickers in the browser.