I did not have time to check it, but from what I see, you insert a line each time. "theTable.insertRow", and then you insert the cell in the new line "newRow.insertCell".
This means that every time you create a new row with only one cell. This means a vertical display.
.
- :
function addRow(thetext,isFirst) {
var theTable = document.getElementById('table_trans').getElementsByTagName('tbody')[0];
var newRow = null;
if(isFirst){
newRow = theTable.insertRow(-1);
}else{
newRow = document.getElementById('table_trans').rows[0];
}
var newCell = newRow.insertCell(0);
var theText = document.createTextNode(thetext);
newCell.appendChild(thetext);
}
function addTransaction() {
var inputTags = document.getElementById('transaction').value;
var tags = inputTags.split(',');
for (var i in tags) {
if i=0{
addRow(tags[i],true);
}else{
addRow(tags[i],false);
}
}
}
:)