3.2.0

obj.getCellTemplate().element() is "undefined"

I'm trying to do the following:

var el = obj.getCellTemplate(1,1).element();
alert(el.offsetHeight);
// or alert(AW.getTop(el));

I'm getting an error "el is undefined".

What am I doing wrong ?? I've seen this call to element() in many threads and seems to be very simple and common, but I spent hours debugging with now success.

-gil
December 10,
Can anyone plz answer, this is urgent as I'm on a project deadline. I am using AW version 2.5.5.
-gil
December 10,
http://www.activewidgets.com/javascript.forum.16149.4/absolute-position-of-a-row.html
December 10,
You need some timeout before document.write(obj):

window.setTimeout ( function(){
var el = obj.getCellTemplate(1,1).element();
alert(AW.getTop(el));
},2000);

Or .. ask it inside an event ( i.e. onCellClicked ):

obj.onCellClicked = function(event,col,row){
var el = obj.getCellTemplate(col,row).element();
alert(AW.getTop(el));
}

HTH
C++
December 10,
Thanks a bunch ... it worked!!
-gil
December 10,

This topic is archived.

See also:


Back to support forum