Hello,
I am trying to send data from javascript and read data back from my
cgi module with this:
SendSyncRequest = function(RequestURL, RequestContent)
{
var request = new XMLHttpRequest();
request.open('GET', RequestURL, false);
request.setRequestHeader('Content-Type',
On Mon, 17 Oct 2011, Felipe Monteiro de Carvalho wrote:
Hello,
I am trying to send data from javascript and read data back from my
cgi module with this:
SendSyncRequest = function(RequestURL, RequestContent)
{
var request = new XMLHttpRequest();
request.open('GET', RequestURL,
On Mon, Oct 17, 2011 at 3:55 PM, Michael Van Canneyt
mich...@freepascal.org wrote:
As far as I know, this will always be empty, for the simple reason that the
request is executed asynchronously. You must attach a callback which is
executed once the request is ready, and read ResponseText after
On Mon, 17 Oct 2011, Felipe Monteiro de Carvalho wrote:
On Mon, Oct 17, 2011 at 3:55 PM, Michael Van Canneyt
mich...@freepascal.org wrote:
As far as I know, this will always be empty, for the simple reason that the
request is executed asynchronously. You must attach a callback which is
On Mon, Oct 17, 2011 at 4:01 PM, Michael Van Canneyt
mich...@freepascal.org wrote:
? AFAIK xhttprequest is never synchronous...
It is synchronous if the third parameter of open is set to false:
http://www.w3.org/TR/XMLHttpRequest/#the-open-method
client . open(method, url, async, user,
On Mon, 17 Oct 2011, Felipe Monteiro de Carvalho wrote:
On Mon, Oct 17, 2011 at 4:01 PM, Michael Van Canneyt
mich...@freepascal.org wrote:
? AFAIK xhttprequest is never synchronous...
It is synchronous if the third parameter of open is set to false:
On Mon, Oct 17, 2011 at 4:11 PM, Michael Van Canneyt
mich...@freepascal.org wrote:
Ehm. I think that the problem is elsewhere. Content is only accepted with
the POST method.
Why? Is this a limitation from HTTP?
If I change to POST then I can no longer select my module, neither
?module=MainPage
On Mon, 17 Oct 2011, Felipe Monteiro de Carvalho wrote:
On Mon, Oct 17, 2011 at 4:11 PM, Michael Van Canneyt
mich...@freepascal.org wrote:
Ehm. I think that the problem is elsewhere. Content is only accepted with
the POST method.
Why? Is this a limitation from HTTP?
Yes.
If I change
On Mon, Oct 17, 2011 at 4:33 PM, Michael Van Canneyt
mich...@freepascal.org wrote:
Yes.
I see ... simply encoding the data differently from what I originally
wanted and feeding it to a GET field worked fine.
You must specify an action. A single path component is treated as an action.
On Mon, 17 Oct 2011, Felipe Monteiro de Carvalho wrote:
On Mon, Oct 17, 2011 at 4:33 PM, Michael Van Canneyt
mich...@freepascal.org wrote:
Yes.
I see ... simply encoding the data differently from what I originally
wanted and feeding it to a GET field worked fine.
Also a solution :-)
10 matches
Mail list logo