Updated in Lightbox

Hello.

I am doing this:

scheduler.attachEvent(“onBeforeLightbox”, function (id) {

scheduler.load("/account/modules/procurements/resources/scheduler.php?id=" + id);

alert(id);

return true;

});

server gives the following data:

<?xml version="1.0" encoding="UTF-8"?>





компания

<rec_type>week_1___1,4,5#no</rec_type>

<event_length>1209600</event_length>

<start_date>2010-11-01 00:00</start_date>

<end_date>2010-18-02 23:59</end_date>





If the I remove the alert(id) from this code, then the data in Lightbox is unaffected. How can I solve this without calling of alert?


Hello,


loading is asynchronous. You can try to use the following approach:


var showLB = false


scheduler.attachEvent(“onBeforeLightbox”,function(id){


scheduler.load("/account/modules/procurements/resources/scheduler.php?id=" + id,function(){
showLB = true
scheduler.showLightbox(id);
showLB = false
});

return showLB;


})