Table of contents
Building blocks
Placing JavaScript: How to add JavaScript to HTML pages. JavaScript includes. The <NOSCRIPT> tag
Object detection: How to see if a browser supports a certain object. Use this instead of a browser detect.
Statements: if() and for().
Functions: How does a JavaScript function work? What can you do with it?
Strings: What are strings and what can you do with them?
Level 0 DOM: General info about the DOMs; history. The Level 0 Document Object Model, for mouseovers and form checks.
Boolean logic: Important in all programming languages.
Intermediate DOMs: The three DOMs that you need for cross-browser DHTML.
Associative arrays: How to use JavaScript objects as associative arrays.
The this keyword: How the this keyword works. Currently only treats event handling.
Object detection: How to see if a browser supports a certain object. Use this instead of a browser detect.
Statements: if() and for().
Functions: How does a JavaScript function work? What can you do with it?
Strings: What are strings and what can you do with them?
Level 0 DOM: General info about the DOMs; history. The Level 0 Document Object Model, for mouseovers and form checks.
Accessibility: Some thoughts about JavaScript and accessibility.
Boolean logic: Important in all programming languages.
Intermediate DOMs: The three DOMs that you need for cross-browser DHTML.
Associative arrays: How to use JavaScript objects as associative arrays.
The this keyword: How the this keyword works. Currently only treats event handling.
Miscellaneous scripts
Mouseover: My version of this classical script. Much simpler than most versions.
Click: The sequel to the Mouseover script.
Print: How to write a print function.
Keep IE apart: An extension of my browser detect serving to keep the various IE versions apart.
Flash detect: How to see if your users have Flash installed. Also works for other plugins
ActionScript and JavaScript: How to make JavaScript communicate with ActionScript and vice versa.
Cookies: How to manage cookies.
Get selection: How to find out what text the user has selected with his mouse.
Writing into layers: How to change the text of elements on your page. Netscape 4 bugginess!
Click: The sequel to the Mouseover script.
Print: How to write a print function.
Browser detect: How to see what browsers your visitors are using. Why not to depend on this too much.
Keep IE apart: An extension of my browser detect serving to keep the various IE versions apart.
Flash detect: How to see if your users have Flash installed. Also works for other plugins
ActionScript and JavaScript: How to make JavaScript communicate with ActionScript and vice versa.
Cookies: How to manage cookies.
Get selection: How to find out what text the user has selected with his mouse.
Writing into layers: How to change the text of elements on your page. Netscape 4 bugginess!
Forms
Introduction to forms: How to write a script that checks user input in a form.
Example form: Simple example of a script that checks user input in a form.
Select box navigation: How to let the user navigate by a select box (drop-down menu).
Disabling form fields: How to write a script that disables form fields.
Example form: Simple example of a script that checks user input in a form.
Select box navigation: How to let the user navigate by a select box (drop-down menu).
Dynamic options: How to write a script that dynamically changes options in a select box.
Disabling form fields: How to write a script that disables form fields.
Frames and windows
Introduction to frames: How to influence other frames.
Popups: How to create a popup exactly as you want it.
Cross-window scripting: Sequel to the pop-up script. How to influence other windows.
Customized framesets: How to put a specific page (not the homepage) in your frameset.
Iframes: How to deal with iframes.
Popups: How to create a popup exactly as you want it.
Cross-window scripting: Sequel to the pop-up script. How to influence other windows.
Customized framesets: How to put a specific page (not the homepage) in your frameset.
Frame busting: How to stay out of someone else's frameset.
Iframes: How to deal with iframes.
Date and time
Introduction to date and time: Epoch Time. The Date object and its methods. The millennium problem and its solution. Compatibility table for date.getYear() and date.getFullYear().
Date and time: How to write a script that prints out the date and time.
Checking a date: How to find out whether a date a user has filled in exists, and whether it's in the future or the past.
Internet Beat: How to write a script that calculates the current Internet Beat time.
Last modified: How to write a script that shows how old your documents are in a user friendly way.
Date and time: How to write a script that prints out the date and time.
Checking a date: How to find out whether a date a user has filled in exists, and whether it's in the future or the past.
Internet Beat: How to write a script that calculates the current Internet Beat time.
Last modified: How to write a script that shows how old your documents are in a user friendly way.
DHTML
Introduction to DHTML: What is DHTML. How to write cross-browser scripts.
DHTML micro API: Tiny script that solves all DOM difficulties for you.
DHTML examples: Simple example of cross-browser DHTML.
Navigation: layers: How to make a DHTML layer navigation.
Navigation: display: The navigation script in this frame
Find position: How to get the true position of an element on the page.
Scrolling layer: How to create a layer that can scroll, a bit like an IFRAME.
Sticky menu: How to create a 'sticky' menu that somewhat emulates position: fixed.
Bilingual pages: How to create an interface for bilingual pages
CSS Disabling: How to disable certain style sheets so that your users can choose which style sheet they like best.
DHTML micro API: Tiny script that solves all DOM difficulties for you.
DHTML examples: Simple example of cross-browser DHTML.
Navigation: layers: How to make a DHTML layer navigation.
Navigation: display: The navigation script in this frame
Find position: How to get the true position of an element on the page.
Scrolling layer: How to create a layer that can scroll, a bit like an IFRAME.
Sticky menu: How to create a 'sticky' menu that somewhat emulates position: fixed.
Bilingual pages: How to create an interface for bilingual pages
CSS Disabling: How to disable certain style sheets so that your users can choose which style sheet they like best.
Events
Introduction to Events: General introduction to event handling. Overview. Browser compatibility problems.
The events: Event descriptions and compatibility tables.
Early event handlers: Inline model, default actions and preventing them.
Traditional model: The traditional event registration model that works in all Version 4+ browsers.
Advanced models: The W3C and Microsoft event registration models.
Event accessing: How to access the event object.
Event properties: How to read out event properties despite serious browser incompatibilities.
Event order: Event capturing and event bubbling. currentTarget
Mouse events: Some advanced tricks and problems of the mouse events. relatedTarget, fromElement, toElement.
Netscape 4: How Netscape 4 mangles event handling.
Event compatibility tables: Quick overview. For the complete list see W3C DOM Events Compatibility Table
The events: Event descriptions and compatibility tables.
Early event handlers: Inline model, default actions and preventing them.
Traditional model: The traditional event registration model that works in all Version 4+ browsers.
Advanced models: The W3C and Microsoft event registration models.
Event accessing: How to access the event object.
Event properties: How to read out event properties despite serious browser incompatibilities.
Event order: Event capturing and event bubbling. currentTarget
Mouse events: Some advanced tricks and problems of the mouse events. relatedTarget, fromElement, toElement.
Netscape 4: How Netscape 4 mangles event handling.
Event compatibility tables: Quick overview. For the complete list see W3C DOM Events Compatibility Table