Through AJAX your supposed to have support for the "PUT" and "DELETE" requests. I have a form that sends data via the "PUT" request and the server acknowledges it but no parameters get sent. The same result happens for the "delete" request. If I change to "post" it works fine. IE 9, Firefox, and Chrome all produce the same result. The put and delete requests are being sent but with no data.
$("#startButton").click(function(){
$.ajax({url:"http://localhost:8084/Project/servlet",
data:parseFormData("simulatorForm"),
cache: "false",
dataType: "text",
contentType: "application/x-www-form-urlencoded",
type:"put",
error:function(xhr){alert(xhr.status + xhr.statusText);} });
});
NOTE: If I change to "post" this works fine. All parameters in my form get transmitted. I tried this in IE, Chrome, and Mozilla Firefox.
I tried doing it in pure javascript but I get the exact same results.
var xmlhttp=new XMLHttpRequest();
xmlhttp.open("PUT","http://localhost:8084/UtilityDashboard/SensorSimulator",true);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send(parseFormData("simulatorForm"));