Posting data via Ajax

Posting data via Ajax

Hello,

I have a project where you have two sortable lists and the contents of one list are saved to a DB. Everything works except $.ajax() seems to do nothing, not even error. Can anyone help me out?

  1. function addItems(){

        var projects = "";
       
        $('#sortable2 li').each(function(){
            projects += this.id + ", ";
           
            //$('#output').html(projects);
        });   

        $.ajax({
            type: "POST",
            url: "savelayout.php",
            data: projects
        });
    }