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.

var obj = new AW.UI.Grid;

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++) {

... 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.
April 28,
Nevermind. I never got it working, but I stole the OP's function from http://www.activewidgets.com/javascript.forum.19561.4/contribution-double-click-header-separator.html and got it working.
April 28,

This topic is archived.

See also:

Back to support forum