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);
>     }
>
>
>
> }

Reply via email to