For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > August 2006 > Answering a XMLHttpRequest without using CGI::Ajax









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Answering a XMLHttpRequest without using CGI::Ajax
Marcus Willemsen

2006-08-08, 7:55 am

Hi everybody,

Like almost everybody else I know I'm playing around with AJAX related =
techniques. Instead of switching over to PHP I'd like to go on using =
Perl to handle my XMLHttpRequests and to query my databases in the =
background. The obvious choice would be to use the CGI::Ajax module. But =
that's no really an option as I haven't got full access to our webserver =
(it's hosted) and I'm therefore unable to install the modules needed.
Is there another way to call functions/scripts containing functions and =
to return the Results as XML to the calling javascript functions?

Gratefull for hints=20

Marcus




Marcus Willemsen
Online Redaktion
Juve Verlag GmbH
Sachsenring 6
50677 K=F6ln
++49 (0)221 91 38 80 16
www.juve.de


Gesch=E4ftsf=FChrer: Dr. Astrid Gerber, Dr. Aled W. Griffiths
Sitz der Gesellschaft: K=F6ln
Amtsgericht K=F6ln HRB 29593, Gerichtsstand: K=F6ln
Bankverbindung: Stadtsparkasse K=F6ln, BLZ 37050198, Kto-Nr. 4772281


Sean Davis

2006-08-08, 7:55 am




On 8/8/06 7:59 AM, "Marcus Willemsen" <Marcus.Willemsen@juve.de> wrote:

> Hi everybody,
>
> Like almost everybody else I know I'm playing around with AJAX related
> techniques. Instead of switching over to PHP I'd like to go on using Perl to
> handle my XMLHttpRequests and to query my databases in the background. The
> obvious choice would be to use the CGI::Ajax module. But that's no really an
> option as I haven't got full access to our webserver (it's hosted) and I'm
> therefore unable to install the modules needed.


You can install this into your home directory on the machine, or put it in
some other directory, if you like. Then, you can

use lib '/directory/where/you/put/CGI::Ajax';

in your script. Then you can use CGI::Ajax as normal.

> Is there another way to call functions/scripts containing functions and to
> return the Results as XML to the calling javascript functions?


There are many ways to return XML, yes. You need a CGI script that returns
XML, basically. The larger issue with AJAX is doing something useful with
the XML (or JSON, or whatever) on the client side using javascript.

Sean

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com