Wednesday, December 19, 2007

Note to self: Ext..DomQuery to traverse table

Use Firebug and ExtJs, then follow the rules.

var table = Ext.query("#table-id")[0]; //would probably be $("table-id") in jQuery
var rows = table.rows;

for (var i = 4; i <>
console.log(rows[i]);
var cells = rows[i].cells;

console.log("Cell size: " + cells.length);

for (var n = 0; n < cells.length; n++) {
console.log(cells[n]);
}
}

No comments: