开发者

jQuery Full Calendar: How to update calendar after completed ajax call?

eventDrop: function(event, dayDelta, revertAction) {
    $.post("/calendar/",{id: event.id } , 
        function(result) {
            if (result == "succeed"){
                alert('succeed');
            }
            else{
                alert("Server error, Please try again");
            }
         },"json");
}

So in this method, I have an ajax call. I want the c开发者_JAVA百科alendar to only be updated when success is returned from the server, otherwise it does nothing. How is this kind of code written?


http://arshaw.com/fullcalendar/docs/event_rendering/rerenderEvents/

.fullCalendar( 'rerenderEvents' )


$.post("/calendar/", {id: event.id }, 
    function (data, textStatus, XMLHttpRequest) {
        // use data if textStatus == 200
    },
    "json"
);

?? see jQuery.post() documentation

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜