My source is "jQuery in Action" (Bibeault/Katz) - page 249,
the $.post function.
According to the documentation post() takes three arguments:
URL, parameters, callback where callback is a function with 2 arguments,
response and status.
I've tried the following - which is called from the form
as onsubmit="CheckForm0(this);" [code]
// argument 'form' is the reference to entry form
function CheckForm0(form) {
    $.post(form.action,form,
      function(response,mystatus){
        alert('response: ' + response + " status: " + status);
        })
  return false;
  } [/code]
But I get the following error message:
"""
Error: uncaught exception: [Exception... "Not enough arguments"  
nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)"  location: "JS frame :: 
http://bart.johnson.com/js/jq/jquery.js :: anonymous :: line 3636"  data: no]
"""
Am I correct that the callback function needs another argument?
It would be helpful if someone could point me to what I have done
incorrectly.

Thanks
Tim (not an ajax virgin, but a jQuery noob)

Reply via email to