Dynamic Web Development with Seaside

20.2Snippets and Brushes

Adding JavaScript code to your Seaside application is not much different from rendering plain XHTML. You need to

  1. ask the rendering canvas html prototype to instantiate a Prototype or script.aculo.us brush,
  2. configure the newly created brush with a cascade of configuration messages, and
  3. add the brush to the XHTML output. This will embed the JavaScript snippet at the desired place into the XHTML output stream.

In the following paragraphs we are going to have a in-depth look at these 3 steps and all the possibilities that Scriptaculous is providing. To directly dive into a running example, skip this section and continue with Section 20.3. To learn about the details you can always come back later.

Copyright © 21 April 2024 Stéphane Ducasse, Lukas Renggli, C. David Shaffer, Rick Zaccone
This book is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 license.

This book is published using Seaside, Magritte and the Pier book publishing engine.