lightbox close

[code]function ShedResp(link,postval) {

var loader = dhtmlxAjax.postSync(link,encodeURI(postval));
outShedResp(loader);
return true;

}
function outShedResp(loader){
check = loader.xmlDoc.responseXML.documentElement.getElementsByTagName(“check”)[0].childNodes[0].nodeValue;
if (check == “error”) {
dhtmlx.alert(loader.xmlDoc.responseXML.documentElement.getElementsByTagName(“error”)[0].childNodes[0].nodeValue);
}
if (check == “ok”) {
dhtmlx.alert(loader.xmlDoc.responseXML.documentElement.getElementsByTagName(“response”)[0].childNodes[0].nodeValue);
}
if (check == “event_inserted”) {
scheduler.resetLightbox();
dhtmlx.alert(loader.xmlDoc.responseXML.documentElement.getElementsByTagName(“response”)[0].childNodes[0].nodeValue);
}
};[/code]

[code] scheduler.attachEvent(“onEventSave”,function(id,data){

ShedP(“insert/shedaction.php”,postval);
// return true;
[/code]

after click on “Save” button shedaction.php goes with xml response but function outShedResp(loader) not close lightbox and no messages ;(

i tried without response, lightbox is closed but scheduler is not accessible ??

Why you are calling scheduler.resetLightbox(); ?

Calling resetLightbox during saving process will hurt scheduler. Try to change code as

setTimeout(function(){ scheduler.resetLightbox(); },1);

which will reset lightbox a moment after closing