Cees Hek wrote:
On 5/21/06, Prakash Inuganti -X (pinugant - Digital-X, Inc. at Cisco)
<[EMAIL PROTECTED]> wrote:
Yes, you are correct. Thanks. I already have a full blown Application
developed using CAP and H::T. So using Template Toolkit right now is not
an option for me. Now I am adding a page that has a select box with
60,000+ names stored in Oracle database that needs to be shown as
dropdown options. So started looking at these Modules and AJAX. My idea
is to provide a text field and a button. After user enters a few
characters and clicks the button, I intend to populate the select drop
down with names matching the text field entry. I am still at a learning
phase so any ideas or sample code to accomplish this in CAP and H:;T
would be a great help.
You should look at using the AutoComplete object in HTML::Prototype.
It will do exactly what you are trying to do, with minimal fuss. I
have an example app running that uses this feature if you want to have
a look at how I did it:
http://cees.crtconsulting.ca/perl/examples/podviewer/
In fact, a version of that example is included with the source for
CGI::Application::Plugin::HTMLPrototype. Although my example uses
Template Toolkit. You can try and get it to work with HTML::Template,
but if that fails, you can always just use the JavaScript library
directly. Just run my example code, and then do a view source in the
browser to see the exact JavaScript code that the HTML::Prototype
library generates for you. Then just copy and paste that into your
templates.
Hey Cees,
In looking at your source there (cool by the way) a question came to
mind. The template is stored in the __DATA__ section. Is that your
standard practice? Is it only because it is one page/template or does
the Ajax integration need it that way?
Robert
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]