Dashboard "; for (var i = 0; i < commodities.length - 1; i++) { phtml += '' + commodities[i] + ''; } //$("#spanProducts").html(' ' + phtml + " "); $("#spanProducts").html(' ' + phtml + " "); ShowCommodity(splitted[2]); } } function getCommodities(commodity) { $("#divOutput").html(""); if (commodity != "") { if (commodities.length == 0) { //no commodities LoadData($("#lstCountries").val(), commodity); } else { //arrays already loaded ShowCommodity(commodity); } } } function ShowCommodity(commodity) { //loading icon $("#divOutput").hide(); $("#divOutput").html(commodityHTMLs[jQuery.inArray(commodity, commodities)]); //enable table sorting $("#tblCommodities").tablesorter(); // Translator function needed if ($("#ddlTrans").val() == "English") { showTranslation("Interface", "showResults()"); } else { showTranslation("Prices - Local", "showResults()"); } } function OnSuccess(output) { if (output == "") { $("#divOutput").html(""); } else { //loading icon $("#divLoading").show(); $("#divOutput").hide(); PageMethods.getCommoditiesWM(commodity, OnSuccess, OnFailure); //commodities.indexOf(commodity) $("#divOutput").html(commodityHTMLs[jQuery.inArray(commodity, commodities)]); //enable table sorting $("#tblCommodities").tablesorter(); // Translator function needed if ($("#ddlTrans").val() == "English") { showResults(); } else { showTranslation("Prices - Local", "showResults()"); } } } function getCommoditiesList(country) { commodities = []; $("#divOutput").html(""); $("#divLoading").show(); PageMethods.getCommoditiesListWM(country, OnSuccessList, OnFailure); } function OnSuccessList(output) { //$("#spanProducts").html(' ' + output + " "); $("#spanProducts").html(' ' + output + " "); //enable table sorting $("#tblCommodities").tablesorter(); // Translator function needed if ($("#ddlTrans").val() == "English") { showResults(); } else { showTranslation("Prices - Local", "showResults()"); } } function showResults() { $("#divLoading").hide(); $("#divOutput").show(); } function OnFailure(error) { alert("Error: " + error); }/// System.String /// /// /// return this._invoke(this._get_path(), 'LoadDataWM',false,{country:country,commodity:commodity},succeededCallback,failedCallback,userContext); }, getCommoditiesListWM:function(country,succeededCallback, failedCallback, userContext) { /// System.String /// /// /// return this._invoke(this._get_path(), 'getCommoditiesListWM',false,{country:country},succeededCallback,failedCallback,userContext); }, getCommoditiesWM_FromDB:function(commodity,succeededCallback, failedCallback, userContext) { /// System.String /// /// /// return this._invoke(this._get_path(), 'getCommoditiesWM_FromDB',false,{commodity:commodity},succeededCallback,failedCallback,userContext); }} PageMethods.registerClass('PageMethods',Sys.Net.WebServiceProxy); PageMethods._staticInstance = new PageMethods(); PageMethods.set_path = function(value) { PageMethods._staticInstance.set_path(value); } PageMethods.get_path = function() { /// The service url. return PageMethods._staticInstance.get_path();} PageMethods.set_timeout = function(value) { PageMethods._staticInstance.set_timeout(value); } PageMethods.get_timeout = function() { /// The service timeout. return PageMethods._staticInstance.get_timeout(); } PageMethods.set_defaultUserContext = function(value) { PageMethods._staticInstance.set_defaultUserContext(value); } PageMethods.get_defaultUserContext = function() { /// The service default user context. return PageMethods._staticInstance.get_defaultUserContext(); } PageMethods.set_defaultSucceededCallback = function(value) { PageMethods._staticInstance.set_defaultSucceededCallback(value); } PageMethods.get_defaultSucceededCallback = function() { /// The service default succeeded callback. return PageMethods._staticInstance.get_defaultSucceededCallback(); } PageMethods.set_defaultFailedCallback = function(value) { PageMethods._staticInstance.set_defaultFailedCallback(value); } PageMethods.get_defaultFailedCallback = function() { /// The service default failed callback. return PageMethods._staticInstance.get_defaultFailedCallback(); } PageMethods.set_enableJsonp = function(value) { PageMethods._staticInstance.set_enableJsonp(value); } PageMethods.get_enableJsonp = function() { /// Specifies whether the service supports JSONP for cross domain calling. return PageMethods._staticInstance.get_enableJsonp(); } PageMethods.set_jsonpCallbackParameter = function(value) { PageMethods._staticInstance.set_jsonpCallbackParameter(value); } PageMethods.get_jsonpCallbackParameter = function() { /// Specifies the parameter name that contains the callback function name for a JSONP request. return PageMethods._staticInstance.get_jsonpCallbackParameter(); } PageMethods.set_path("CommoditiesLocal.aspx"); PageMethods.LoadDataWM= function(country,commodity,onSuccess,onFailed,userContext) { /// System.String /// System.String /// /// /// PageMethods._staticInstance.LoadDataWM(country,commodity,onSuccess,onFailed,userContext); } PageMethods.getCommoditiesListWM= function(country,onSuccess,onFailed,userContext) { /// System.String /// /// /// PageMethods._staticInstance.getCommoditiesListWM(country,onSuccess,onFailed,userContext); } PageMethods.getCommoditiesWM_FromDB= function(commodity,onSuccess,onFailed,userContext) { /// System.String /// /// /// PageMethods._staticInstance.getCommoditiesWM_FromDB(commodity,onSuccess,onFailed,userContext); } //]]>Prices - LocalLanguage: EnglishAlurBamanankanBembaBengaliDawidaDutchEkegusiiFrenchGandaGermanGujaratiGunguHindiIndonesianKiembuKinyarwandanKipsigisLubukusuLugbaraMalayalamMarathiMasaabaNyankoreOdiaPortuguesePunjabi (Gurmukhi Script)RussianShonaSpanishSwahiliTachelhitTamilThai [ edit ]
