Thanks for the tip, Aaron. I've been using the alert for some feedback, as well as Firebug. As someone fairly new to JS, it all takes some getting used to. Thanks, too, for the other approach to the code and to the console code. Much appreciated! Rick From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Aaron Heimlich Sent: Thursday, March 29, 2007 10:33 AM To: jQuery Discussion Subject: Re: [jQuery] Correct way to setup a callback function On 3/29/07, Rick Faircloth <[EMAIL PROTECTED]> wrote: $.post("Calc_Test_Process_Field_chris.cfm", Params, toggleButton);
That's definitely the correct syntax ( <http://docs.jquery.com/Ajax#.24.post.28_url.2C_params.2C_callback_.29> http://docs.jquery.com/Ajax#.24.post.28_url.2C_params.2C_callback_.29). Try adding something like alert("Toggling submit button"); to the beginning of toggleButton to see whether it's being called or not. Another thing I just realized is that toggleButton only gets called if the request was successful. Try this: var settings = { type: "POST", url: "Calc_Test_Process_Field_chris.cfm", data: Params, success: toggleButton, error: requestError }; jQuery.ajax(settings); // note, this assumes you are using Firefox with Firebug 1.0 installed function requestError(request, message, exception) { console.log("Danger Will Robinson! Danger!"); console.log("An error occurred when requesting %s", settings.url); console.log("Settings: %o", settings); console.log("HTTP Status Code: %d", request.status"); console.log("HTTP Status Message: %s", request.statusMessage); console.log("jQuery Status Message: %s", message); console.log("Response Body: %s", request.responseText); console.log("Exception %o", exception); } and see if requestError gets called. -- Aaron Heimlich Web Developer [EMAIL PROTECTED] http://aheimlich.freepgs.com
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/