Prototype and Scriptaculous: Taking the Pain out of JavaScript

Book description

JavaScript is carrying more and more programming load lately as Ajax has become popular. Scripting Ajax from scratch isn't much fun, but fortunately there are libraries to help. Prototype and Scriptaculous will let you get much more work done in much less time, automating tasks from processing XMLHTTP requests to creating animations that draw attention to your interfaces.

This Short Cut demonstrates how to use Prototype for a wide range of tasks, including event handling, DOM processing, string and form process, and Ajax communications. It explores Scriptaculous' visual effects library, from pulsate to squish to fold and beyond. Need interface components? You'll find form autocompletion as well as drag and drop support.

In addition to sample code and explanation, the Short Cut includes member references for both Prototype and Scriptaculous.

Visit the catalog page for Prototype and Scriptaculous: Taking the Pain out of JavaScriptVisit the errata page for Prototype and Scriptaculous: Taking the Pain out of JavaScript

Table of contents

  1. Copyright
  2. Introduction
  3. Why Use Prototype and Scriptaculous?
    1. Writing Event Handlers Without Prototype
    2. Making Ajax Calls Without Prototype
    3. Creating Effects Without Scriptaculous
    4. Dragging and Dropping Without Scriptaculous
  4. Techniques Used When Calling the APIs
    1. Defining Classes
    2. JavasScript Is a Prototype Rather than OO Language
    3. Closures / Anonymous Functions and Functions as Objects
    4. Objects as Bags of Properties, Duck Typing, and JSON
    5. What Is 'this'
  5. Using Prototype
    1. Utility Functions
    2. Creating Classes in a More Object-Oriented style
    3. Extensions to Core JavaScript Objects
    4. Manipulating Documents
    5. Enumerable Objects and Iterator Functions
    6. Hashes
    7. Ajax
    8. General Principles
  6. Using Scriptaculous
    1. Getting Started
    2. Visual Effects
    3. Toggling Effects
    4. Controls
    5. AutoCompletion
    6. Drag-and-Drop
    7. Putting Everything Together
  7. Prototype and Scriptaculous Members
    1. Conventions Used
    2. Ajax members (Prototype)
    3. Ajax.Base members (Prototype)
    4. Ajax options members (Prototype)
    5. Ajax.PeriodicalUpdater members (Prototype)
    6. Ajax.Request members (Prototype)
    7. Ajax.Responders members (Prototype)
    8. Ajax.Updater members (Prototype)
    9. Array members (Prototype)
    10. Autocompleter members (Scriptaculous)
    11. Class members (Prototype)
    12. Document members (Prototype)
    13. Draggable members (Scriptaculous)
    14. Draggables members (Scriptaculous)
    15. Droppables members (Scriptaculous)
    16. Effect members (Scriptaculous)
    17. Effect.Highlight members (Scriptaculous)
    18. Effect.MoveBy members (Scriptaculous)
    19. Effect.Opacity members (Scriptaculous)
    20. Effect options members (Scriptaculous)
    21. Effect.Parallel members (Scriptaculous)
    22. Effect.Scale members (Scriptaculous)
    23. Element members (Prototype)
    24. Element.ClassNames (Prototype)
    25. Enumerable members (Prototype)
    26. Event members (Prototype)
    27. Field members (Prototype)
    28. Form members (Prototype)
    29. Form.Element (Prototype)
    30. Form.Element.Observer members (Prototype)
    31. Form.Element.EventObserver members (Prototype)
    32. Form.Element.Serializers members (Prototype)
    33. Form.Observer members (Prototype)
    34. Form.EventObserver members (Prototype)
    35. Function members (Prototype)
    36. Global members (Prototype)
    37. Hash members (Prototype)
    38. Insertion.After members (Prototype)
    39. Insertion.Before members (Prototype)
    40. Insertion.Bottom (Prototype)
    41. Insertion.Top members (Prototype)
    42. Number members (Prototype)
    43. Object members (Prototype)
    44. ObjectRange members (Prototype)
    45. PeriodicalExecuter members (Prototype)
    46. Prototype members (Prototype)
    47. String members (Prototype)
    48. Try members (Prototype)

Product information

  • Title: Prototype and Scriptaculous: Taking the Pain out of JavaScript
  • Author(s): Chris Angus
  • Release date: November 2006
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 0596529198