NAME

Sledge::Plugin::Prototype - Sledge plugin which implements wrapper arround HTML::Prototype module

SYNOPSIS

package Foo::Pages::Bar;
use Sledge::Plugin::Prototype; # just use

# you can use parameter 'prototype' if template engine is tt
[% prototype.define_javascript_functions %]

# or in your dispatcher
sub dispatch_prototype_js {
  shift->show_prototype_js;
}

# use the helper methods
<div id="view"></div>
<textarea id="editor" cols="80" rows="24"></textarea>
[% prototype.observe_field( 'editor', 'http://foo.bar/baz', { 'update' => 'view' } ) %]

DESCRIPTION

Sledge::Plugin::Prototype is Sledge plugin which implements wrapper arround HTML::Prototype module. use Sledge::Plugin::Prototype in your Pages class, then prototype method is imported in it. if you chose Sledge::Template::TT as template engine, parameter prototype is set in your template.

AUTHOR

Yasuhiro Horiuchi <yasuhiro@hori-uchi.com>

SEE ALSO

HTML::Prototype