GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
CGI::Application::Plugin::HTMLPrototype(3) User Contributed Perl Documentation CGI::Application::Plugin::HTMLPrototype(3)

CGI::Application::Plugin::HTMLPrototype - Give easy access to the prototype JavaScript library using HTML::Prototype

 use base qw(CGI::Application);
 use CGI::Application::Plugin::HTMLPrototype;

 sub myrunmode {
   my $self = shift;

   # Get prototype object
   my $prototype = $self->prototype;

 }

HTML::Prototype is a JavaScript code generator for the prototype.js JavaScript library (<http://prototype.conio.net/>), and the script.aculo.us extensions to prototype.js (<http://script.aculo.us/>). It allows you to easily add AJAX calls and dynamic elements to your website.

Simply returns an HTML::Prototype object. See the HTML::Prototype docs for information on the methods that are available to you.

This module is very useful when used in concert with the Template Toolkit. Since version 0.07 The CGI::Application::Plugin::TT module automatically adds a 'c' parameter to your template, which gives you access to your CGI::Application object from within your templates. This will give you easy access to the prototype plugin from within all of your templates.

Here is an example. The following example will create a hidden 'div' tag and a link that will make the div fade in when clicked.

  [% c.prototype.define_javascript_functions %]
  <a href="#" onclick="[% c.prototype.visual_effect( 'Appear', 'extra_info' ) %]">Extra Info</a>
  <div style="display: none" id="extra_info">Here is some more extra info</div>

See the examples directory for some examples

Cees Hek <ceeshek@gmail.com>

Please report any bugs or feature requests to "bug-cgi-application-plugin-htmlprototype@rt.cpan.org", or through the web interface at <http://rt.cpan.org>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

Patches, questions and feedback are welcome.

CGI::Application, CGI::Application::Plugin::TT, HTML::Prototype, perl(1)

Copyright (C) 2005 Cees Hek, All Rights Reserved.

This library is free software. You can modify and or distribute it under the same terms as Perl itself.

2022-04-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.