Thanks, Frank. I guess I need this book :) Before I get it, allow me
one more question.

I have a working XHR using GET (target is full URL with query params):

  ajaxRequest.open("GET", target, true);
  ajaxRequest.send(null);

Now I want to switch to POST (url is base URL, params contain request params):

  ajaxRequest.open("POST", url, true);
  ajaxRequest.send(params);

It does not work. The parameters are sent, but apparently not as
content, but as "Cache-Control" attributes. The working POST request
shows like this in LiveHTTPHeaders (another test app):

POST /strutsdialog/dialogloginactioncontrol.do HTTP/1.1
...
Content-Length: 41
name=&password=&DIALOG-EVENT-LOGIN=Log+In

The non-working XHR POST request looks like this:

POST /jspcontrols-samples/login/loginComponent.jsp HTTP/1.1
...
Content-Length: 68
Cache-Control: no-cache
    jspcontrols.ajax.xhtml=true&loginEvent=1&username=user&password=pass

Here my parameters are listed as a child for "Cache-Control" element.
Application does not see them.

What I am doing wrong and how to do it right?

Michael

On 3/11/06, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> The Manning AJAX In Action book has an appendix that covers a great many
> of these useful techniques.  Even if you have zero interest in AJAX, I
> haven't seen many books or articles that covers Javascript as well as
> this one.  I consider myself fairly well-versed in Javascript, and even
> I picked up a trick or two and otherwise solidified by understanding.
> Very much recommended (yeah, and the coverage of AJAX ain't bad either!)
>
> Frank

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to