That's how I do it, too. JSON.pm does the outgoing conversion:
sub get_json {
my $perl_data_structure = shift;
use JSON; # imports objToJson
return objToJson( $perl_data_structure );
}
jQuery has lots of tools for handling incoming JSON and for sending form
data to CGI::Application
Lyle Brooks wrote:
Does anyone have a short starter example of code (both server and client)
that they would be willing to post/share that would show Ajax/JSON
usage with CGI::Application?
The client is just Javascript and it's best to pick a framework to handle all
the messy browser
Hi Folks
On Thu, 2009-04-09 at 10:20 -0500, P Kishor wrote:
On Thu, Apr 9, 2009 at 9:53 AM, Lyle Brooks bro...@deseret.com wrote:
I have a need to incorporate Ajax calls with JSON data into
our application. I was looking for something in terms of a piece
of starter code or a recipe. I
Hi Lyle
I've written a new module, CGI::Application::Demo::Ajax, which is a
small search engine to retrieve records via Ajax and Json.
I'll document it next and release it to CPAN.
--
Ron Savage
r...@savage.net.au
http://savage.net.au/index.html
# CGI::Application community mailing list
I have a need to incorporate Ajax calls with JSON data into
our application. I was looking for something in terms of a piece
of starter code or a recipe. I didn't see anything on the website
related to it.
CGI Application seems like such a robust framework, that this should be
a natural
I have a need to incorporate Ajax calls with JSON data into
our application. I was looking for something in terms of a piece
of starter code or a recipe. I didn't see anything on the website
related to it.
CGI Application seems like such a robust framework, that this should be
a natural fit.
On Thu, Apr 9, 2009 at 9:53 AM, Lyle Brooks bro...@deseret.com wrote:
I have a need to incorporate Ajax calls with JSON data into
our application. I was looking for something in terms of a piece
of starter code or a recipe. I didn't see anything on the website
related to it.
CGI
I'm writing a new CGI app, and decided to go web 2.0 -- i.e., use Ajax
to update parts of the page, trying to never load an entirely new
page.
I'm at a crossroad:
should the CAP-based back-end normally return
JSON data (and let the javascript library (I've decided on jQuery)
place and format
Hi Mark
I'm at a crossroad:
should the CAP-based back-end normally return
JSON data (and let the javascript library (I've decided on jQuery)
place and format the data on the page),
or should the back-end normally return
HTML (via html templates), which will be dropped into different,
I'm at a crossroad:
should the CAP-based back-end normally return
JSON data (and let the javascript library (I've decided on jQuery)
place and format the data on the page),
or should the back-end normally return
HTML (via html templates), which will be dropped into different, say, divs?
I've been using CGI::Ajax with CGI::Application, and I'm curious to know
what you have in mind. At the moment
I don't have a grasp of what the plugin would bring to the table. Perhaps
you could elaborate?
Well I was thinking of just making using CGI::Ajax via
CGI::Application more
From: Stewart Heckenberg
Sent: Saturday, 30 December 2006 10:22 p.m.
I've been using CGI::Ajax with CGI::Application, and I'm curious to
know what you have in mind. At the moment I don't have a
grasp of what
the plugin would bring to the table. Perhaps you could elaborate?
Well I
G'day,
My first post to this list :)
I'm aware of the HTMLPrototype plugin that uses the Prototype Javascript
library, however has anyone tried developing a plugin based on CGI::Ajax or
that doesn't rely upon particular libraries? I don't know what the Ajax
plugin linked-to via the cgiapp site
On Thursday 12 October 2006 09:01, Robert Hicks wrote:
I know this is sad.
What is the term I should be looking for when I want to bring back only
the associated records with a drop down selection?
I assume you mean What AJAX command do I use?. That depends on the
javascript framework you
Say, has anyone got a minimal example of embedding AJAX into a CGI::APP,
preferably using some library to abstract the Javascript (CGI::Ajax or
SAJAX or something else) ?
http://search.cpan.org/~bct/CGI-Ajax-0.6/lib/CGI/Ajax.pm
I'd like a supercharged ajaxy version of this TreeTable
On Tue, 18 Oct 2005 23:55:15 -0700, Tim Colson \(tcolson\) wrote:
Hi Tim
Of course, you could always try CGI::Explorer:
http://search.cpan.org/~rsavage/CGI-Explorer-2.05/
--
Cheers
Ron Savage, [EMAIL PROTECTED] on 19/10/2005
http://savage.net.au/index.html
Let the record show: Microsoft is not
On Tue, Oct 18, 2005 at 11:55:15PM -0700, Tim Colson (tcolson) wrote:
Say, has anyone got a minimal example of embedding AJAX into a CGI::APP,
preferably using some library to abstract the Javascript (CGI::Ajax or
SAJAX or something else) ?
Hey Tim --
Say, has anyone got a minimal example of embedding AJAX into
a CGI::APP,
preferably using some library to abstract the Javascript (CGI::Ajax or
SAJAX or something else) ?
I'm sure a few other people will email you examples of AJAX
implementations. I just wanted to make one
Jesse Erlbaum wrote:
Hey Tim --
Say, has anyone got a minimal example of embedding AJAX into
a CGI::APP,
preferably using some library to abstract the Javascript (CGI::Ajax or
SAJAX or something else) ?
I'm sure a few other people will email you examples of AJAX
implementations. I
do a TreeTable with it, but it's a good start.
Barry
-Original Message-
From: Tim Colson (tcolson) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 19, 2005 12:55 AM
To: cgiapp@lists.erlbaum.net
Subject: [cgiapp] Ajax?
Say, has anyone got a minimal example of embedding AJAX
I completely agree. I wonder how hard this AJAX transition will be for
frameworks that rely on page-style sites.
I can see it now: A separate file for every function, and they will
love it.
(To be fair, in Java that will be three separate files for every
function, plus a big honkin' EJB
(To be fair, in Java that will be three separate files for every
function, plus a big honkin' EJB library and an XML
configuration file.
And they will love it, too.)
lol -- interesting idea of fair. Many of the java MVC frameworks are
not all that different from CA in the amount of
On Wed, 19 Oct 2005 16:18:55 -0400, Jesse Erlbaum wrote:
Hi Jesse
Your Javascript would make an HTTP request on timeout (for example,
when the user stops typing for a couple seconds). That request
would be internal, and would get back a line-delimited list of
options, which would then be
From: Ron Savage [EMAIL PROTECTED]
I don't use timeout, I send every char back to a Perl module (RPC.pm),
which
connects to the db, and then does:
Isn't that a lot of resources for each character without *any* timeout? If
it's not running in mod_perl (or one of the persistent perl environments)
Ron Savage wrote:
(This Perl is from my Database.pm):
# ---
sub find_entity_via_keystrokes
{
my($self, $prefix) = @_;
my($sql) = select entity_id, entity_name from entity where entity_name_key
like lower('$prefix%') order by
From: Ron Savage [EMAIL PROTECTED]
I don't use timeout, I send every char back to a Perl module (RPC.pm),
which connects to the db, and then does:
Ron, since AJAX is asynchronous, what are the risks that typing savag
would result in 6 search results arriving back to the client out of order?
On Thu, 20 Oct 2005 03:46:43 +0200, Rhesa Rozendaal wrote:
Hi Rhesa
I do hope you're in a tightly controlled environment, or that
you're properly untainting and detoxifying $prefix. I'd suggest
I should give a fuller answer to this, so...
For beginners not familiar with what this detoxifying
On Thu, 20 Oct 2005 03:46:43 +0200, Rhesa Rozendaal wrote:
Hi Rhesa
Isn't your like case-insensitive? I guess that might depend on
the database engine.
Under MySQL yes, but the code (also) runs primarily under Postgres.
--
Cheers
Ron Savage, [EMAIL PROTECTED] on 20/10/2005
On Wed, 19 Oct 2005 19:35:07 -0700, Mark Fuller wrote:
Hi Mark
Ron, since AJAX is asynchronous, what are the risks that typing
savag would result in 6 search results arriving back to the
client out of order? (Maybe a search request reaches the server
Well, yes, that may be possible. In
On Wed, 19 Oct 2005 18:38:12 -0700, Mark Fuller wrote:
Hi Mark
Again, a fuller answer.
I could see this as acceptable within an *intra*net (for an
application with a known/limited number of users). Is that
something you'd want to do for a public web site?
It's on an intranet, with only ever
30 matches
Mail list logo