On 3/7/07, bmsterling <[EMAIL PROTECTED]> wrote: > > Hey guys and gals, > I am trying to do something like below: > > buildDialogBox({u:'oba_1_2',f:loadJson('userlist.txt', > buildUserManageTable),d:'formDialog600'}); > > and have loadJson('userlist.txt', buildUserManageTable) run after the dialog > box loads, but it gets executed and then the buildDialogBox function get > executed. I know this is done in a bunch of plugins with call back, but I > just cant figure it out.
To use a function as a callback, you must pass the _reference_, not execute the function. In this case, you should use an anonymous function, so buildDialogBox({ u:'oba_1_2', f: function() { loadJson('userlist.txt', buildUserManageTable); }, d:'formDialog600' }); HTH. -- Choan <http://choangalvez.nom.es/> _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/