HI. I am writing a javascript to dynamic add a row to a table. In that row, there is a checkbox. Everytime when I refresh the cold fusion page, it will check a variable, if this variable equal to 'Y', then the check box need to be checked. But for some reason, the system won't recognize that line code. Please view the code below.
Thank you very much.

function addRowToTable()
{
var tbl = document.getElementById('acc_info');
var lastRow = tbl.rows.length;
//insert row
var row = tbl.insertRow(lastRow);
row.name = 'sat_del';
row.id = 'sat_del';

//insert the cell
var cell = row.insertCell(0);
var el = document.createElement('input');
el.type = 'checkbox';
el.name = 'sat_delivery';
el.id = 'sat_delivery';
el.value = 'Y';
<cfif Form.sat_delivery eq 'Y'>
el.checked = 'true'; //System ignore this line. the check box won't be checked in the html.
</cfif>
cell.appendChild(el);
}