Home  |  Linux  | Mysql  | PHP  | XML
From:Rene Schickbauer Date:Tue Dec  1 12:01:21 2009
Subject:Re: Loading results (via ajax) from a CGI
buzon@alejandro.ceballos.info wrote:
> I have a CGI (made with cgi.pm) that receive a parameters, check against
> a DB and returns a text with "not found" or "OK found" message. Pretty
> simple.
>
> In other site, i have an ajax routine that sends the parameters (via
> get) and is expected to capture the resulting page, but is not working.
> If I try with a static page, there is not problem, only when calling
> that CGI.

The may be a problem with your headers. What i mean is, is the browser
(wrongly) caching the page you request?

Try setting the correct headers. Also, you might add an ever-changing
dummy value to your request to trick the browser into thinking this is a
new, non-cached page.

You have
var myurl = 'http://server/script.cgi?value='+int_value;

change to:

var myurl = 'http://server/script.cgi?value='+int_value + '&dummyvalue='
+ now.getTime();

LG
Rene
Navigate in group perl.beginners.cgi at sever nntp.perl.org
Previous Next


Your recent visits
Re: problems with 'require'



  
© No Copyright
You are free to use Anything, but please consult your advocate before doing so as this website
also list content from other sources which may be copyrighted.
Site Maintained by Zareef Ahmed
Powered By PHP Consultants