|
//-------------------------------------------------------------------------------
// Created by : Gianluca Negrelli
// Copyright : 2010.05.17
//-------------------------------------------------------------------------------
// Server communication
//-------------------------------------------------------------------------------
function StuffSelection_Proxy() { }
//#region Static methods
// -----------------------------------------
// Shows stuff list according to certain category (GET call)
// -----------------------------------------
StuffSelection_Proxy.GetStuffListHttpGet = function (category, successCallback, failureCallback) {
$.ajax({
type: "GET",
contentType: "application/json; charset=utf-8",
url: "StuffSelection.aspx/GetStuffListServiceHttpGet?category=" + category,
success: function (data) { successCallback(data); },
error: function (data) { failureCallback(data); }
});
}
// -----------------------------------------
// Shows stuff list according to certain category (POST call)
// -----------------------------------------
StuffSelection_Proxy.GetStuffListHttpPost = function (category, successCallback, failureCallback) {
var jsonData = JSON.stringify({ category: category });
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "StuffSelection.aspx/GetStuffListServiceHttpPost",
data: jsonData,
success: function (data) { successCallback(data); },
error: function (data) { failureCallback(data); }
});
}
//#endregion Static methods
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I'm the very proud father of
SyMenu, a multi awarded portable start menu and
www.ghezee.com an innovative ads web site.