Index: lams_tool_larsrc/web/pages/itemreview/instructionsnav.jsp =================================================================== RCS file: /usr/local/cvsroot/lams_tool_larsrc/web/pages/itemreview/instructionsnav.jsp,v diff -u -r1.27 -r1.28 --- lams_tool_larsrc/web/pages/itemreview/instructionsnav.jsp 8 Apr 2014 00:07:25 -0000 1.27 +++ lams_tool_larsrc/web/pages/itemreview/instructionsnav.jsp 2 Jun 2014 10:27:11 -0000 1.28 @@ -55,7 +55,7 @@ var url="?sessionMapID=${sessionMapID}&mode=${mode}&itemUid=${param.itemUid}&reqID="+reqIDVar.getTime(); jQuery.ajax({ type: 'GET', - dateType: 'script', + dataType: 'script', url: url, timeout: 5000, @@ -66,12 +66,19 @@ jQuery("input#FinishInstruction").addClass("disabled"); }, - error: function() { - alert('server timeout'); + error: function(jqXHR, textStatus, errorThrown) { + alert('Error while marking item as complete.\nStatus: ' + textStatus + '\nError: ' + errorThrown); }, - success: function(data) { - eval(data); + success: function() { + var winParent = window.parent; + if (!winParent.opener.checkNew) { + // there can be an extra iframe in the hierarchy + winParent = winParent.parent; + } + winParent.opener.checkNew(); + winParent.opener=null; + winParent.close(); }, complete: function() {