Many thanks folks!
I'll try use this here.
Marcus
On 26 jan, 03:45, Uwe Feldtmann [EMAIL PROTECTED] wrote:
Markm wrote:
I am just begining here ... do you mind if I see that your complete (I
mean your controller and defs) code? For eg, I did not understand this
piece of code:
I'm
function () { ... } is the definition of an anonymous function. Like a
lambda in python.
On 1/25/07, Markm [EMAIL PROTECTED] wrote:
Hi Uwe
I am just begining here ... do you mind if I see that your complete (I
mean your controller and defs) code? For eg, I did not understand this
piece of
Markm wrote:
I am just begining here ... do you mind if I see that your complete (I
mean your controller and defs) code? For eg, I did not understand this
piece of code:
I'm fighting with the same problem and it'll be very useful if I could
learn with you!
Hi Markus.
I see that Bob
Uwe Feldtmann wrote:
I've been using the Live headers and the result is:-
The original request
POST /xul/c_user HTTP/1.1
The response...
HTTP/1.x 200 OK
Server: PasteWSGIServer/0.5 Python/2.4.3
Date: Fri, 05 Jan 2007 06:39:12 GMT
Content-Type: text/html; charset=UTF-8
Connection: close
Robert Leftwich wrote:
..snip
That should be *onreadystatechange* not onreadystatechage, i.e. there
is a missing n in change.
Isn't peer programming wonderful. Thanks Robert.
I've been looking at that code all day and just couldn't see the typo.
New glasses needed perhaps.
It's all
Uwe Feldtmann wrote:
I'm sending POST data via XMLHttpRequest as follows:-
xhr = new XMLHttpRequest()
... callback omitted xhr.open( POST, url, true ) - where url is
/contr/func
xhr.send( data ) - where data is a string
?parm1=value1amp;parm2=value2
When I try to retrieve the values in
On Jan 4, 2007, at 3:50 PM, Uwe Feldtmann wrote:
I sent this by e-mail 24 hours ago and it hasn't appeared - not sure
why. Sorry if it gets here twice.
Your first one just arrived before this one, for some reason. =]
In the form handling document it states that if POST is used the data
Robert Leftwich wrote:
Try removing the ? and keeping the , i.e.
data = parm1=value1parm2=value2;
xhr.send( data );
HTH
Robert
Tried that and it makes no difference. I still get the same error.
The problem appears to be somewhere in Pylons I think. It doesn't seem
to be decoding the
Philip Jenvey wrote:
Your first one just arrived before this one, for some reason. =]
Who knows. The message showed up as soon as I posted the entry via the
groups page. H.
Just this data would be an invalid POST request. You need a Content-
Type header set, and I'd recommend having a
On Jan 4, 2007, at 5:49 PM, Uwe Feldtmann wrote:
Philip Jenvey wrote:
Your first one just arrived before this one, for some reason. =]
Who knows. The message showed up as soon as I posted the entry via
the groups page. H.
Just this data would be an invalid POST request. You need a
Uwe Feldtmann wrote:
The Content-Length is correctly set or so it seams and I've looked at so
many examples my head is swimming.
This is the header info as reported by Pylons.
CONTENT_LENGTH: '20'
CONTENT_TYPE: 'application/xml'
Set the content type to application/x-www-form-urlencoded
Thank you Robert and Philip for all your help.
One more gotcha for anyone trying this at home is that the content-type
can only be set after the .open() call in the XMLHttpRequest.
The working request code:-
function xhrpost( url, data, callback ) {
xhr = new XMLHttpRequest();
Uwe Feldtmann wrote:
A call via GET works but since I changed the request to POST it's not
sending anything back to javascript even though I've registered a callback.
Any clues?
In these sorts of situations the LiveHTTPHeaders extension for FF is a big help.
If you run it and look at
I've been using the Live headers and the result is:-
The original request
POST /xul/c_user HTTP/1.1
Host: localhost:5000
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8.0.9)
Gecko/20070102 Ubuntu/dapper-security Firefox/1.5.0.9
Accept:
14 matches
Mail list logo