I'm confused (again).
In looking at the manual it givesa number of examples at least two of which imply that you don't need to have a callback function.
Examples: (from manual)
Example: Request the test.php page, but ignore the return results.
$.post("test.php");
Example: Request the test.php page and send some additional data along (while still ignoring the return results).
$.post("test.php", { name: "John", time: "2pm" } );
Example: pass arrays of data to the server (while still ignoring the return results).
$.post("test.php", { 'choices[]': ["Jon", "Susan"] });
Example: send form data using ajax requests
$.post("test.php", $("#testform").serialize());
Example: Alert out the results from requesting test.php (HTML or XML, depending on what was returned).
$.post("test.php", function(data) {
alert("Data Loaded: " + data);
});
Example: Alert out the results from requesting test.php with an additional payload of data (HTML or XML, depending on what was returned).
$.post("test.php", { name: "John", time: "2pm" },
function(data) {
alert("Data Loaded: " + data);
});
Example: Gets the test.php page content, store it in a XMLHttpResponse object and applies the process() JavaScript function.
$.post("test.php", { name: "John", time: "2pm" },
function(data) {
process(data);
},
"xml"
);
If I use a callback function like:
function () {