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:
GET
http://192.168.80.39:8080/OutilSegmentationSpring/...C2%A9&segmentId=187&segmentTypeId=2&combinedTitle=
http://192.168.80.39:8080/OutilSegmentationSpring/SingleSegment.action?method=saveTitleDescription&title=qui+s%27appelle+V+ou+b&description=qui+s%27appelle+V+ou+b%0Aqui+s%27appelle+V+ou+b%0A%0A%C3%83%3F%C3%82%C2%A9%C3%83%3F%C3%82%C2%A9%C3%83%3F%C3%82%C2%A9%C3%83%3F%C3%82%C2%A9%C3%83%3F%C3%82%C2%A9&segmentId=187&segmentTypeId=2&combinedTitle=
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.action?method=edit&id=187
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
-~----------~----~----~----~------~----~------~--~---