Hi Mark,
I finally got around to trying this and looked up your email for help.
Wherever I put <!-- tmpl_var c.prototype.define_javascript_functions
--> declaration, GUI shows HTML::Prototype=HASH(0x101be00). I have no
idea about what's happening. I had to install quite a few dependent
modules while installing CAP::HTMLPrototype and CAP::HTDot. Would this
be because some module is not installed properly. Also when I click on
'Extra Info', I get a JavaScript error saying 'Effect is undefined'.
Could you help me understand the issue please.
Thanks in advance for your help.
Thanks
Prakash
-----Original Message-----
From: news [mailto:suppressed On Behalf Of Mark Stosberg
Sent: Friday, November 11, 2005 10:13 PM
To: suppressed
Subject: [cgiapp] Re: Help with CGI::Application::Plugin::HTMLPrototype
On 2005-11-09, Prakash Inuganti -X (pinugant - Ahura Inc. at Cisco)
<suppressed> wrote:
>
> Can you help me with a small example to use
> CGI::Application::Plugin::HTMLPrototype in HTML::Template. I am trying
> to add a row of data dynamically retrieved by an sql query when a user
> enters a date into text field.
Prakash,
You might consider using the HTDot plugin, which adds a dot notation for
method calls to HTML::Template, like Template Toolkit has. You can
access all methods in the CGI::App object by adding this:
$t->param( c => $self );
I have submitted a patch so the next version will do this by default.
Then it's all very simple. Just put code like this in your template:
<!-- tmpl_var c.prototype.define_javascript_functions --> <a href="#"
onclick="javascript:<tmpl_var
c.prototype.visual_effect('Appear','extra_info')> return false;">Extra
Info</a> <div style="display: none" id="extra_info">Here is some more
extra info</div>
Mark
--
http://mark.stosberg.com/
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.