Thanks, it did indeed need to go into the callback function in order to work, I just didn't have the syntax quite right the first time I tried it.
- jason malsup wrote: > >> This works fine for the first step (the form that is initially loaded), >> but >> fails to bind to the newly loaded form after submit. I tried moving the >> recursive call into the after/success callback of .ajaxSubmit, but it >> didn't >> make any difference. Not sure what else to try. Any suggestions? > > Jason, > > The binding definitely needs to execute in the callback of the > ajaxSubmit method. > > $('form').ajaxSubmit({ > target: '#pgContentInner', > url: '/path/to/page', > method: 'post', > complete: function(xhr, status) { > if (status == "error") > // do error stuff > else > bindForm(); > } > ); > > What happens when you run bindForm from the callback? Have you tried > using Firebug and setting a breakpoint on that line? > > Mike > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/help-with-recursive-function-tf3039726.html#a8552500 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/