function RefreshMissionsAjax() { //fade out the old table. $(clientID('MissionsDisplay')).fadeOut(500); //request the new value from the page (calls the GetIncompleteMissions() method in the MissionViewer.aspx.cs page) $.ajax({ type: "POST", url: "MissionViewer.aspx/GetIncompleteMissions", data: "{}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { $(clientID('MissionsDisplay')).html(msg.d); $(clientID('MissionsDisplay')).fadeIn(500); }, error: function (xhr, ajaxOptions, thrownError) { $(clientID('MissionsDisplay')).html('An error occured while trying to refresh the page data.'); $(clientID('MissionsDisplay')).fadeIn(500); } }); }