21 You could also make the ajax call more generic, reusable, so you can call it from different CRUD (create, read, update, delete) tasks for example and treat the success cases from those calls.
Possible Duplicate: How does AJAX work? Note: This is a community wiki post I've often heard of AJAX being used for providing a user with dynamic content. What is it and how does it work?
70 Jquery.ajax does not encode POST data for you automatically the way that it does for GET data. Jquery expects your data to be pre-formated to append to the request body to be sent directly across the wire. A solution is to use the jQuery.param function to build a query string that most scripts that process POST requests expect.
I created jQuery File Download which allows for an "Ajax like" experience with file downloads complete with OnSuccess and OnFailure callbacks to provide for a better user experience. Take a look at my blog post on the common problem that the plugin solves and some ways to use it and also a demo of jQuery File Download in action. Here is the source
269 Ajax post and upload file is possible. I'm using jQuery $.ajax function to load my files. I tried to use the XHR object but could not get results on the server side with PHP.
contentType is the HTTP header sent to the server, specifying a particular format. Example: I'm sending JSON or XML dataType is you telling jQuery what kind of response to expect. Expecting JSON, or XML, or HTML, etc. The default is for jQuery to try and figure it out. The $.ajax() documentation has full descriptions of these as well.
I am having trouble with the AntiForgeryToken with ajax. I'm using ASP.NET MVC 3. I tried the solution in jQuery Ajax calls and the Html.AntiForgeryToken(). Using that solution, the token is now be...
AJAX (Asynchronous JavaScript and XML) is a newly coined term for two powerful browser features that have been around for years, but were overlooked by many web developers until recently when applications such as Gmail, Google Suggest, and Google Maps hit the streets.
I have a form with name orderproductForm and an undefined number of inputs. I want to do some kind of jQuery.get or ajax or anything like that that would call a page through Ajax, and send along a...