I am following GitHub - zhihailiu/alfresco-folder-size: Alfresco folder size to calculate the folder size and its working fine,that is the folder size is showing as a separate component alongwith the properties of the folder but now I also want to show the size in the document library of the folder.the following link contains the code
when I am trying to access the variable size outside the jsonGet method,it is showing undefined that is the default value of size
but after searching on internet,I learned that jsonGet is asynchronous,so it is exceuted after the synchronous code.so,I replaced the jsonGet method with $.ajax method and set the async to false to make $.ajax synchronous and access the variable outside the jsonGet method.but,still the variables "size" is undefined.
any help would be greatly appreciated.I am trying dis from many days
Re: not able to access variable outside $.ajax method
Yupp thanks for dis but I am actually trying to execute the last html statement inside the printsize function so as to show the size of folder in document library but after a little testing,I get to know that html statement is executed properly if it remains only inside the renderer function and not in any other function(e.g. even not inside the printsize function)
How to execute that html statement with size having the value that is manipulated inside the ajax function rather than the default value.