У меня есть строка кода, похожая на эту, где обратный вызов никогда не выполняется:
GroupRepository.Add("#divSortingArea", oGroup, oSow.AddGroupToPage, (function() { alert(123); }));
Спасибо, ребята, без всплывающих окон!
Приветствия, Shotemba
вот полный код:
function GroupRepository () {}
GroupRepository.Add = function (targetSelection, oGroup, addToPage) {
var tableToInsert = null;
var nGroupID = oGroup.nScopeOfWorkGroupID;
var sDescription = oGroup.sScopeOfWorkGroupDescription;
Eclipse3.GroupService.InsertGroup(Globals.N_JOB_ID, oGroup, InsertGroup_Success, InsertGroup_Error);
function InsertGroup_Success(response) {
nGroupID = parseInt(response.nIdentity);
var bConcurrencyId = response.bNewConcurrencyId;
//If this entry contains rows pull those rows out,
var rows = tableToInsert.find("tbody tr");
tableToInsert.remove();
oGroup.nScopeOfWorkGroupID = nGroupID;
oGroup.bConcurrencyId = bConcurrencyId;
var newGroupElement = addToPage(oGroup);
//add to the new group being created,
newGroupElement.find("tbody").append(rows);
//Globals.DisplayMessage("Insert Succeeded", "Your attempt to add a new record was successful.");
Globals.DisplayMessage("Insert Group Succeeded", "A new record was added.");
return this;
};
function InsertGroup_Error(error) {
Globals.HandleError("Item Group Failed", error);
};
}