Archive for December, 2010

Thursday, December 30th, 2010

Ignoring the Enter Key

The enter key can interact with different forms in different ways depending on what fields are in the form and which currently has the focus. Here’s how to get a form to completely ignore that key. Ignoring the Enter Key

Saturday, December 25th, 2010

Merry Christmas

If you celebrate Christmas (whether as a religious holy day or as a secular work break) I wish you and your family all the best for the day. For those of other religions or who for other reasons do not celebrate Christmas my wishes for you are the same.

Wednesday, December 22nd, 2010

Creating a Static Link

This perhaps wasn’t the best title to give to the page since what I actually mean is a link that appears in a fixed position within the browser viewport with the page content scrolling behind it. It is actually much easier to achieve in modern browsers but this way of doing it is still needed […]

Sunday, December 19th, 2010

Counting Words

This simple JavaScript added to a textarea will give you a running total of the number of words that have been typed into the field. Counting Words

Saturday, December 18th, 2010

Clearing or Highlighting Default Text

Displaying default text in an input field may be useful but you need to make it easy for your visitors to replace that default value with their own if the default isn’t what they want. Here we look at a couple of alternatives depending on whether you want the default text as an optional value […]

Friday, December 17th, 2010

More Dynamic Dropdown Boxes

In this variant on my dynamic dropdown script we have two dropdowns and two buttons. The purpose of the buttons is to move the selected entry from one dropdown into the other. More Dynamic Dropdown Boxes

Wednesday, December 15th, 2010

Renaming Files

All operating systems provide a way for you to rename the files on your computer. How to do it depends on your operating system. Renaming Files

Tuesday, December 14th, 2010

Adding the JavaScript

The last step in creating my example template is to add the JavaScript that provides the functionality for the page. Adding the JavaScript

Monday, December 13th, 2010

Adding Image Placeholders

I started writing a short series on how to create a web page template some time ago. Just realised that I forgot to publish the last two tutorials. Here’s the seventh tutorial which explains how to add placeholder images into our template. Adding Image Placeholders

Sunday, December 12th, 2010

sIFR – Why Bother

In a forum discussion some time ago one of those involved in the discussion was having problems with getting sIFR to behave consistently between Firefox 2 and Firefox 3 and decided to test the useragent to try to work out which browser was which to change the processing accordingly. Now the latest sIFR script is […]

Thursday, December 9th, 2010

Overlay Messages Revisited

Continuing on with revisiting old scripts and updating them. The script that is most similar to my tooltip script (and therefore needed almost identical changes) is my overlay messages script. As with the tooltip script I have included both the old and new versions of the script so that you can see the differences between […]

Wednesday, December 8th, 2010

Extended Tooltips Revisited

Now that the really old browsers that pre-date the standards have almost no one using them any more the scripts that we wrote a few years ago can be made a lot simpler. The references to document.all and document.layers (and useragent tests for Netscape 4 to get around the bug that stopped feature sensing for […]