I am trying to figure out someone else’s codes. It is written by Javascript. I am more familiar with Jquery.
I know it’s a function but not sure that these parameters for (imaglist,sucess, hobject). Thanks for the help.
var mystuff = new Object();
var all_done = function (imagelist,success,hobject){
//alert(success);
mystuff = imagelist.list;
}
Technically it’s just a function, with imagelist, success, and hobject as parameters. So you’d call it like :
But in this case, it looks like all_done is a callback function, which is called when something (not shown here) finishes. imagelist, success, and hobject are callback variables, which are results of whatever function the callback is assigned to.
Lets say we have an ajax call, like this:
now when the ajax call is completed, the results of it, assuming there are three, will be passed to all_done. Really I’m not even sure if this is possible with an ajax call, but the idea is what’s important. So, when the ajax call is complete,
mystuffwill be set to imagelist.list;