Miscellaneous Tips

Using JavaScript and CSS to Create a Magnetic Poetry Page
Using JavaScript to Search For and Highlight Text on a Web Page
Fun With Active Desktop
JavaScript Datepicker
Google Suggest-type Lookups
Gradual Image Resizing Using JavaScript


Using JavaScript and CSS to Create a Magnetic Poetry Page
April 26, 2003

Adapting some code I found over at the BrainJar site, I created a page that allows you to drag various words and objects around a page, much like the "magnetic poetry" concept you'll find on some refrigerators.

MagneticPoetry.htm


Using JavaScript to Search For and Highlight Text on a Web Page
September 6, 2003

This page has some examples of JavaScript functions you can use to search for and highlight text on the current web page.

JavaScript Text Highlighting


Fun With Active Desktop
July 15, 2004 (updated July 21)

A lot of people use the Active Desktop feature of Windows to display pictures or websites on their workspace, but you can also use it to add functionality to your desktop without doing any real programming (maybe a little JavaScript or VBScript, but nothing complicated).

Below is a sample file you can play around with to explore a few possibilities. Just save the file to your computer, rename it with a ".htm" extension, and follow the directions outlined in the comments of the file itself (you'll have to open it in a text editor to see the comments). This example just adds a few input boxes that allow you to quickly open web pages and files, and do Google searches, but with a little creativity you might be able to think of some modifications that would make it even more useful for yourself.

(UPDATE: I also added a little JavaScript calendar page below, if you're interested.)

QuickLinks.txt (rename it as a ".htm" file before using it)
QuickCal.txt (rename it as a ".htm" file before using it)


JavaScript Datepicker
September 4, 2004 (updated December 4, 2005)

This is some JavaScript code (and an associated style sheet) that allow you to easily add drop-down date picker functionality to your HTML forms, without having to rely on a Java applet. I've included the code and the style sheet inline with the page, but you'll probably want to separate the two into their own .js and .css files for more generic use in multiple situations.

I've lightly tested the code in Internet Explorer 6 and Mozilla Firefox. I have no idea how well it works on other browsers.

DatePickerTest.htm


Google Suggest-type Lookups
December 22, 2004 (updated January 9, 2005)

The pages below demonstrate how to use XmlHttp (Ajax) requests to make dynamic lookups on a web page, using the same technique that is found on the Google Suggest page. I made heavy use of Chris Justis' Google Suggest Dissection article in writing this example code.

Enter A Zip Code Using Google Suggest-Type Lookups
Lookup Lotusphere 2005 Sessions Using XmlHttp


Gradual Image Resizing Using JavaScript
March 17, 2005

This is an example of using JavaScript to gradually enlarge or shrink an image on a page, much like the icons on the Mac OSX icon bar. I use this for mouseover effects, but there might be some other interesting applications of it as well. I first saw this technique on the Google X page (which has since been pulled -- see this entry on ElliotBack.com for details and a look at what the page looked like).

Gradual Image Resizing Demo