I have text area. Textarea Content arising from nestable list serealized process.
Textarea content is like: `[{"id":1,"children":[{"id":4}]},{"id":2}]`

Text area:

```
 <div class="span6">
    <h3>Serialised Output (per list)</h3>
    <textarea id="nestable_list_1_output" class="m-wrap span12"></textarea>
 </div>

```

Also i have one jquery function:

```
$(function() { 

function conv(data){
var result=[];
function dfs(node, parent) {
    for(var i in node){
        result.push({id:node[i].id,pid:parent});
        if (node[i]['children']) dfs(node[i]['children'],node[i]['id']);
    }
}
dfs(data, 0);
return result;
}

```

I want make ajax post every time when values on texarea ​​are changed.

```
var data     = JSON.stringify(conv($.parseJSON($("textarea#nestable_list_1_output").val())));

$.ajax({
  type: 'POST',
  url: "http://example.com/navigation/save_menu",
  data: 'menu_data=' + JSON.stringify(data),
  dataType: 'json',
  success: console.log('Data Post:' + data),

```

});  

How to do that?
Many thanks for responses.
Karlis.

**UPDATE**

Based on great comunity members sugestions **event** has changed to **clik button**.
Thanks for sugestions ;)