element function not working
I am trying to get a reference to the SPAN object used for each cell to tally up the offsetWidth and adjust the column size appropriately.
I add the data (no problem there). Then, at the very end of the function, I do this:
... just to see if I get anything as a test. No dice. If I just do:
... I get an output of the SPAN tag associated with the cell. Any attempts to use the "element()" function return "undefined". Any attempts to use the ".offsetWidth" on that undefined element function just error out (obviously). Am I missing something? I've seen references all over the forums regarding the "element()" function, but I don't see where I'm going wrong.
I'm using version 2.5.1. TIA.
var obj = new AW.UI.Grid;
obj.setId("myGrid");
I add the data (no problem there). Then, at the very end of the function, I do this:
for (fixCol=0;fixCol < colCount;fixCol++) {
var i_width = 0;
for (checkCell=0;checkCell < rowCount;checkCell++) {
window.alert(obj.getCellTemplate(fixCol,checkCell).getContent("box/text").element());
}
}
... just to see if I get anything as a test. No dice. If I just do:
window.alert(obj.getCellTemplate(fixCol,checkCell).getContent("box/text"));
... I get an output of the SPAN tag associated with the cell. Any attempts to use the "element()" function return "undefined". Any attempts to use the ".offsetWidth" on that undefined element function just error out (obviously). Am I missing something? I've seen references all over the forums regarding the "element()" function, but I don't see where I'm going wrong.
I'm using version 2.5.1. TIA.
Josh
April 28,