Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Mar 05, 2007 09:35
open dhtmlx forum
I have some problems with the .setOnLoadingStart() and the .setOnLoadingEnd() functions: <div id=...

I have some problems with the .setOnLoadingStart() and the .setOnLoadingEnd() functions:


<div id=

"RecipeList" width="100%" height="450px"

style="background-color:white;overflow:hidden;"></div>
<div class=PleaseWaitClass id="PleaseWaitRecipeListStatus"

><img border="0" src="./images/progress.gif"

/></div>
<script type="text/javascript"

>
function PleaseWaitRecipeListStart()
{

document.getElementById('PleaseWaitRecipeListStatus').style.display='block';
}
function PleaseWaitRecipeListEnd()
{
document.getElementById('PleaseWaitRecipeListStatus').style.display='none';

}
gridRecipeList = new dhtmlXGridObject('RecipeList');
gridRecipeList.imgURL = "images/";
gridRecipeList.setHeader("Recipe Number,Product Number,Product Name,Version");
gridRecipeList.setInitWidths

("120,120,250,120");
gridRecipeList.setColAlign("right,right,left,right");
gridRecipeList.setColTypes("ro,ro,ro,ro");
gridRecipeList.setColSorting("str,str,str,str")
gridRecipeList.init

();
gridRecipeList.setOnLoadingStart( PleaseWaitRecipeListStart() );
gridRecipeList.setOnLoadingEnd( PleaseWaitRecipeListEnd() );

gridRecipeList.enableBuffering(100);
gridRecipeList.loadXML("pluginpage.aspx?PIPID=Recipe&RecipeXmlList=1");

</script>


also tried with:

gridRecipeList.setOnLoadingStart( 'PleaseWaitRecipeListStart()' );
gridRecipeList.setOnLoadingEnd( 'PleaseWaitRecipeListEnd()' );

Answer posted on Mar 05, 2007 09:35

you should pass function object to method, not call function there:
yourGrid.setOnLoadingStart(function(){alert(‘Do what you need here’)})
or
function doIt(){
 alert(‘Do what you need here’)
}
yourGrid.setOnLoadingStart(doIt)

Answer posted by Inga (Support) on Nov 29, 2014 20:40

Having solved the problem mentioned above, you may also look through the possible related problems with event calendar javascript free and progress bar using javascript.