onEventSave blocking function

Since onEventSave uses blocking I’m having problems calling another javascript function in the event.

scheduler.attachEvent("onEventSave", function (id, data, is_new_event) {
        $('#smsg').show();
        if (Cal.validate(id, data) != '') {
            $('#smsg').hide();
            alert(error);
            return false;
        } else {
            Cal.save(id, data, is_new_event); //this returns true or false
        }
    });

The first call $(’#smsg’).show(); never gets called until the entire onEventSave is finished. It’s suppose to show a message to the user so they know something is happening. Any javascript except an alert or window.open is blocked. How can I show a “loading…” type message onEventSave.

I think, the problem is in Cal.save command, it uses sync ajax call, isn’t it ? The sync ajax call blocks any activity in browser, you need to change it to the async logic to fix the problem.

That was it. Once changed to async it works. Thank You