House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  JQuery

Form submit success method not being called

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Scott Brady
01/03/2010 09:07 PM

I'm having an issue using the jquery form plug-in.  The form gets submitted just fine (I can see the response in Firebug).  However, it looks like my success callback method isn't being called. Here's the basic JS code for the form submit in the "document.ready" section.:     // Add form binding     var addOptions =     {       dataType: 'json',       resetForm: true,       success: processAdd     };     $("#addForm").ajaxForm(addOptions); And, here's the callback function: function processAdd(responseData, statusText) { alert(responseData); } I've tried changing the success be an inline function declaration (success: function(responseText){ ... etc) but that didn't change it. Would using ajaxSubmit() rather than ajaxForm() work better?  Or, is there something I'm actually doing wrong that you can see? Scott -- ----------------------------------------- Scott Brady http://www.scottbrady.net/

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave l
01/27/2010 03:50 PM

what does firebug show for returning json response? What are you submitting it to and how are you returning the data, are you for sure returning json data and you need to parse that data when it comes back as well. If you can see it's sending then the problem is the file that’s returning it most likely. ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Scott Brady
01/28/2010 12:05 PM

Sorry. I never saw the post go through here, so thought it never got posted, so I didn't do a follow-up. I was able to use the "failure" handler on the call to debug the problem (the json wasn't quite right). Thanks, though! Scott > > what does firebug show for returning json response? What are you submitting it to and how are you returning the data, are you for sure returning json data and you need to parse that data when it comes back as well. If you can see it's sending then the problem is the file that?s returning it most likely. > > > > -- ----------------------------------------- Scott Brady http://www.scottbrady.net


<< Previous Thread Today's Threads Next Thread >>

Search jquery

September 20, 2014

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30         

Designer, Developer and mobile workflow conference