This DHTML ad script displays an "inexcusable" box in the middle of the page, broadcasting ads of your choice inside. The box automatically disappears after x seconds, with its display frequency configurable.
This JavaScript allows you to have a test run using confirm alerts to have the user enter in TRUE or FALSE for each question. The results are computed and then given (via a popup) to the user. This test is easily modified by just adding a new question,answer pair.
The author notes, "The JavaScript confirm alert box differs from a regular alert box in that it provides two choices for the user, OK and Cancel. Typically, you’ll see confirmation boxes utilized on links where the destination is outside the domain of the page you’re currently on or to alert you of potentially objectionable material. The following example will display a confirmation alert box when either a link or form button is clicked. Once either OK or Cancel are selected an alert box will follow to display which was chosen."
This JavaScript shows a very simple example of how to create a button that does something JavaScript-like in nature when it is clicked. The alert() function is predefined: we could have made our own function and then called it upon the onClick event.
Here is a simple JavaScript example which will generate a simple alert box based on clicking a link or a form button. Useful for alerting users for missing fields, displaying a message on document open or close, or informing users they’ve clicked a link, etc.
Use this custom DHTML "widget" to uniquely present new or notable pieces of information to your visitors. The interface is cross browser compatible, and can be dragged/ hidden freely by the user.
Auto-prompt users to bookmark your homepage using this simple IE-only script! This script uses a simple browser detect which activates or avoids an alert box. This is a simple, yet effective use of this IE-only feature.
This JavaScript uses an onUnload function to prompt the user to bookmark a page while exiting a page. It's a simple script but is a nice introduction to the onUnload function.