Oracle database design, development and administration
Data Management
Project Management
Cryptic crossword.
A bit about me.
Read my blog
Recent additions
Home
Clicking on a link opens up a window with a demo of the tip - the code can be accessed by viewing the source or by following the link on the demo page.

Note: The demos have been optimized for Internet Explorer 4+. They will work on Netscape Navigator 4+ (unless marked otherwise) but the formatting may look a bit strange.
  1. Submit once
           Here's a way to ensure that your users click a button only once. This is particularly useful for pages that take a while to load. The code works with links too.

  2. Dynamic toolbar
           Your site may have a bunch of related pages which you want linked to each other. The time tested solution is to use a toolbar. Now, if you don't have a way of including documents (via SSI or some other mechanism), you would have to duplicate your toolbar code on every relevant page. This demo shows you how you can get JavaScript to do the hard work for you. I've used this technique on my Oracle & ColdFusion pages on this site.

  3. Disable user input while page loads (IE only)
           Users are naturally impatient to get on with their data input tasks. Sometimes, however, you may want them to wait until the page is fully downloaded. This demo shows you how to do this by testing for the existence of a dummy form which is placed at the bottom of the page in question.

  4. Simplify entry of repetitive numeric data
           Several financial data input forms involve repetitious data entry. For example, in one of our projects, users fill in yearly budget figures by account. Very often users simply want to divide a yearly total equally between all months. This demo shows you how to do this with the user entering only the total.

  5. Catch invalid inputs as they occur
           In forms with a large number of elements it is better to validate inputs as they are entered, rather than doing a global form validation on submission. This forces users to correct the invalid entry before they move out of the form element.

  6. Enable the Arrow keys for easy navigation through a form (IE Only)
           This demo shows you how to enable the Up, Down, Left and Right keys for easy navigation through a form. This was implemented in a project in response to a user request.

  7. Focus on the first form element when the document loads
           Make life a little easier for your users by automatically focussing the cursor on the first form element when the document loads.

  8. Prevent duplicate selections in a series of drop-down menus
           At times you may have an input form with a series of select boxes which are populated with the same data. However, for reasons of data integrity (primary key violations, for instance), you may need to prohibit users from making duplicate selections. With JavaScript this is a breeze.

  9. Easy select from a long drop-down menu
           Users are usually irritated by having to scroll down long drop-down menus to get to their selection - particularly if they know their selection in advance. Here's one simple solution to the problem. I have actually implemented this in a project where there were over 900 selections in the menu - the client was quite happy with this workaround.

  10. Deactivating objects after submission of a request
           This tip shows you how to deactivate any form elements or hyperlinks dynamically. This is particularly useful when you want to prevent users from performing any action while a form is being processed.