Function after ajax load
Function after ajax load

Hello, i'm pretty new to javascript so please have mercy if my question is silly..
I'm using an ajax source, with sAjaxSource, and i need to retrieve the biggest value in a column so I use the simple: [code]
for ( var i=0 ; i<=oTableLocal.length ; i++ )
{
var aTrs = oTableLocal.fnGetData(i);
if (aTrs[17]>max) max=aTrs[17];
}
return max;
[/code]
The problem is that it starts before the ajax source is loaded so fnGetData returns null, how can I use this function only after the sAjaxSource has been fully loaded?
I'm using an ajax source, with sAjaxSource, and i need to retrieve the biggest value in a column so I use the simple: [code]
for ( var i=0 ; i<=oTableLocal.length ; i++ )
{
var aTrs = oTableLocal.fnGetData(i);
if (aTrs[17]>max) max=aTrs[17];
}
return max;
[/code]
The problem is that it starts before the ajax source is loaded so fnGetData returns null, how can I use this function only after the sAjaxSource has been fully loaded?
This discussion has been closed.
Replies
Allan