function show_result() { var line_limit = 15; //Echo not checked var macro_counter = 1; if ($('#m_echo').is(':checked')) { line_limit = 14; } var step = $('#temp').val().split(","); console.log($('#temp').val()); $('#result').css('height', (step.length * 30) + 'px') var html = ''; for (var j = 0; j < step.length - 1; j++) { if (j != 0 && j % line_limit == 0) { if(line_limit==7){ html += '/echo Crafting Macro #'+macro_counter+' Completed!';} html += '