Professional JavaScript

JavaScript EditorFree JavaScript Editor     Ajax Editor

Professional JavaScript

Table of contents #1 | Table of contents #2 | Table of contents #3 | Table of contents #4 | Table of contents #6 | Table of contents #7

Text box events
Tab forward automatically
Limit textarea characters
Explorer, Safari, Opera, as well as Mozilla
Allowing/blocking characters in text boxes
Allowing valid characters
Blocking paste
formatEvent
Validating onblur
Numeric text boxes with the up/down arrow keys
numericScroll
List Boxes and Combo Boxes
Accessing options
getSelectedIndexes
Adding options
Removing options
Moving Options
Creating an Autosuggest Text Box
guts
colors called
autosuggest functionality
Sorting Tables
comparison function
The reverse() method
rows
comparison function
array
Sorting a Multicolumn Table
comparison function generator
Modifying the sortTable() function
Sorting in descending order
Sorting with different data types
Creating a conversion function
Modifying the code
JavaScript code
Advanced sorting
HTML code
Modifying the code
getAttribute
text values
Drag and Drop
Drag-and-drop events
Drop Target Events
Using all drag-and-drop events
drop target
Creating your own drop target
dataTransfer object
Methods
dropEffect and effectAllowed
URL
The dragDrop() method
Element.dragDrop();
Simulated Drag and Drop
The code
handleMouseDown
Some calculations
Creating drop targets
EventUtil.addEventHandler
zDragDrop
Creating a draggable element
element is being dragged
zDraggable.moveTo
Drag and Drop
Error Handling
Errors versus Exceptions
Error Reporting
Display a notification about every script error
Internet Explorer (MacOS)
Mozilla (all platforms)
Safari (MacOS X)
Opera 7 (all platforms)
Handling Errors
Extracting error information
Image loading errors
Handling syntax errors
The try...catch statement
Nested try...catch statements
message property
Determining the type of error
Error objects
Debugging Techniques
Using the Java console
Posting messages to the JavaScript console
Throwing your own errors
JavaScript Verifier
JavaScript debugger
Breakpoints and stepping
Venkman – Mozilla’s debugger
Foreground Pane
Loaded Scripts pane