¡@

Home 

2014/10/16 ¤W¤È 12:04:50

jquery Programming Glossary: loaddepartments

Dynamic tree control

http://stackoverflow.com/questions/11949884/dynamic-tree-control

selected node from DB function '#tt' .tree onBeforeExpand function node var hospitalId node.id .getJSON '@Url.Action LoadDepartments ' hospitalId hospitalId function HttpGet public ActionResult LoadDepartments Guid hospitalId LoadHospitals var departments.. node.id .getJSON '@Url.Action LoadDepartments ' hospitalId hospitalId function HttpGet public ActionResult LoadDepartments Guid hospitalId LoadHospitals var departments _templateAccessor.GetDepartments hospitalId var hospital tree.Where obj.. open var result SerializeToJsonString tree return Json result JsonRequestBehavior.AllowGet In method LoadDepartments I have correct structure but the tree doesn't show new elements. the question is how to clean up previous content of tree..

Waiting on multiple asynchronous calls to complete before continuing

http://stackoverflow.com/questions/2768293/waiting-on-multiple-asynchronous-calls-to-complete-before-continuing

requests to populate drop downs with their values. function LoadCategories '#Category' LoadPositions '#Position' LoadDepartments '#Department' LoadContact It then calls LoadContact Which does another call and when it returns it populates all the fields.. along these lines .executeAfter function When these are done LoadCategories '#Category' LoadPositions '#Position' LoadDepartments '#Department' LoadContact Do this ...it would need to keep track of the ajax calls that happen during the execution of.. prevent running again when other calls finish LoadContact LoadCategories '#Category' LoadPositions '#Position' LoadDepartments '#Department' This will run when all current requests are finished then unbind itself so it doesn't run if future ajax calls..