If you can't find a behavior to do what you want, you can always resort to writing JavaScript code directly. The Script behavior allows you to specify a script fragment with the javascript attribute. Here we call the YUI library to set the avatar (image to the left) to hide and then popup an alert.'

This is also useful for debugging a protoscript.

You can click here to restart the example.

$proto('#avatar', {
  Click: {
    onClick: {
      Script: {
        javascript: 'YAHOO.util.Dom.setStyle("avatar", "display", "none");alert("done!");'
      }
    }  
  }
});