If you specify an url like url?param=x in your POSTcall
it it changed by a GET internally, so you must check if you are doing so

----- Original Message ----- 
From: "James" <[email protected]>
To: "jQuery UI" <[email protected]>
Sent: Monday, July 27, 2009 1:37 PM
Subject: [jquery-ui] Re: Why does my "POST" request change into "GET"?



This Google group is primarily for jQuery UI questions. For jQuery
library related questions, there's a jQuery groups for it:
http://groups.google.com/group/jquery-en

But to answer your question:
method: "POST",

is suppose to be:
type: "POST"

$.ajax() options:
http://docs.jquery.com/Ajax/jQuery.ajax#toptions

On Jul 27, 2:14 am, Shu Yi <[email protected]> wrote:
> Hello,
>
> I'm using jQuery to develop a form, which edits title and description
> of a product.
> However I don't understand why the http request is changed into "GET"
> instead of "POST" when the function is called. Could anyone tell me
> how to avoid this unexpected change?
>
> Thanks very much.
>
> This is my function:
> functionsaveTitleDescription(urlAction) {
>
> $.ajax({
> method : "POST",
> url : urlAction,
>
> data : {
> method : "saveTitleDescription",
> title : $("#title").val(),
> description : $("#description").val(),
> segmentId : $("#newCombinedSegmentId").val(),
> segmentTypeId : $("#segmentTypeId").val(),
> combinedTitle : $("#combinedTitle").val()
> }, //données à envoyer
>
> success : function() {...
>
> }
>
> error : function() {...
>
> }
>
> }
>
> }
>
> This is what I read in Firefox's Http request console:
>
> GEThttp://192.168.80.39:8080/OutilSegmentationSpring/...C2%A9&segmentId=...http://192.168.80.39:8080/OutilSegmentationSpring/SingleSegment.actio...
>
> 200 OK
> 109ms jquery.js (ligne 3511)
> ParamètresEn-têtesPostPutRéponseCache
> combinedTitle
>
> description
>
> qui s'appelle V ou b
> qui s'appelle V ou b
>
> �©�©�©�©�©
>
> method
>
> saveTitleDescription
>
> segmentId
>
> 187
>
> segmentTypeId
>
> 2
>
> title
>
> qui s'appelle V ou b
>
> Réponse
> Server
>
> Apache-Coyote/1.1
>
> Charset
>
> UTF-8
>
> Content-Type
>
> text/xml;charset=utf-8
>
> Content-Length
>
> 42
>
> Date
>
> Mon, 27 Jul 2009 12:09:43 GMT
>
> Requête
> Host
>
> 192.168.80.39:8080
>
> User-Agent
>
> Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.0.12) Gecko/
> 2009070611 Firefox/3.0.12
>
> Accept
>
> application/xml, text/xml, */*
>
> Accept-Language
>
> fr,en-us;q=0.8,fr-fr;q=0.5,en;q=0.3
>
> Accept-Encoding
>
> gzip,deflate
>
> Accept-Charset
>
> ISO-8859-1,utf-8;q=0.7,*;q=0.7
>
> Keep-Alive
>
> 300
>
> Connection
>
> keep-alive
>
> X-Requested-With
>
> XMLHttpRequest
>
> Referer
>
> http://192.168.80.39:8080/OutilSegmentationSpring/SingleSegment.actio...
>
> Cookie
>
> JSESSIONID=B069AF8871DE6CCAB0DB65DE5C0CC681


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to