Need help with HTTP Post to WCF service
Im in over my head here and hope someone can/will help. I need to post a form to a WCF service via HTTP Post. The form will validate (easy to do) and upon the servers response populate a div with a success or error msg. I can do this on our own server via .ajax submit but can't get it to work here. Do I need to use .json, .jsonp? Here is what I have and its not working at all
//validation placement settings
$.ajax({
url: "https://xxxxxx.com/Reseller/POST.svc/Cancel",
type: "post",
data: data,
dataType: "html",
success: function(data) {
var answer = $(data).find("td:eq(4)").text();
if (answer==="TRUE") {
$("#resetPassword").remove();
$("#resetSuccess").fadeIn("slow");
} else {
$("#resetPassword").remove();
$("#resetError").fadeIn("slow");
}
}
});
return false;
},
//rules and msgs
the form returns the success flag in a table in the 4th td
any help will be greatly appreciated.
Thanks!