AJAX - Length Required issue with POST
I've been having an issue in Firefox using AJAX where I've been getting this error/response
After trying several things (trimming, "cfcontent reset" etc) I really couldn't figure out what was going on, and Mr Google didn't help out that much either. Eventually, after more playing, I found a solution - now this may not be the best solution but it works:
When making a AJAX 'POST' to the server (I think) the response header needs to be a certain content type. Simply changing the POST to a GET resolved my issue. Like i said it might not be the best solution but it worked.
Does anyone know why this would be happening and would you mind commenting on a better solution?
My code is:
<script type="text/javascript">
function updateClickCount(feedId) {
$.ajax({
type: "GET",
dataType: "html",
success: function(response){},
url: "myURL/feedService.cfc?method=updatedClickCount&feeditemId="+feedId
});
};
</script>





Sure it went away after I added some data to the POST request (like a timestamp).
http://www.openjs.com/articles/ajax_xmlhttp_using_...
solve the problem in mozilla.
xmlhttp.open("POST",window.location+"?name=test",true);
xmlhttp.send(window.location+"?name=test");
This will solve the problem of "length requried" in mozilla
it working on mozilla but it not best solution,