Why do you want an if when the separation of concerns is all there for you?
Amos On Thu, Jan 14, 2010 at 1:21 PM, bryan <br...@resenmedia.com> wrote: > Holy moly, that's beautiful. Thanks so much for your help! > > > > On Jan 14, 11:04 am, Mike Alsup <mal...@gmail.com> wrote: > > > So if someone has a second, can you let me know if the above code > > > could potentially get out of sync? Maybe when I create the list item > > > > You don't need to use both the success and complete fn. You can use > > complete like this: > > > > complete: function(xhr, status) { > > if (status == "success") { > > $('ul.notes').append('<li><a href="#">' + xhr.responseText + > > '</a></li>'); > > var key = XMLHttpRequest.getResponseHeader('Note-Key'); > > $('ul.notes > li:last-child a').attr('href', '#' + key); > > } > > > > > > > > } > -- Amos King http://dirtyInformation.com http://github.com/Adkron -- Looking for something to do? Visit http://ImThere.com