There is a cycle of processes. For example such . The system may have several studios for each process. What I want to do is save the resulting studios for each process and save them in a single cell array separated by commas. So that later I could take the resulting studios for each process and save them to the database.
My function with which I am trying to save data:
var LISTOBJ = { saveList: function() { $(".output").html(""); var listCSV = []; $(".studio").each(function() { $(this).find("input").each(function() { listCSV.push($(this).text()); }); var values = '' + listCSV.join(',') + ''; $(".output").append("<input type='text' name='studio[]' value='" + values + "' />"); $("#output").append("<p>" + values + "</p>"); console.debug(listCSV); }); } } How can I fix this feature to save studios from one process together? In the end, I want to get something like this:
Array ( [0] => ,APEX, BASECAMP [1] => , CANVAS, ORBIT)
var listCSV = [];must be inserted inside$(".studio").each(function() {orvar values = '' + listCSV.join(',') + ''; ...- render. - Igorselectclass has astudioclass, put this class to the secondselecty too - Igor