HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/RMourik/bassol.nl/CMS/CMSModules/StrandsRecommender/Scripts/StrandsModule.js
var STRANDS = (function (my, $) {
    "use strict";

    /**
     * Performs asynchronous web call using jQuery Ajax and ASP.NET WebMethod.
     * Logs error message to JS console when call is unsuccessful.
     * @param {string} method Web method to be called.
     * @param {object} data Data input to be sent to web method.
     */
    my.webMethodCall = function (method, data) {
        return $.ajax({
            type: "POST",
            url: window.applicationUrl + "CMSModules/StrandsRecommender/Pages/WebMethods.aspx/" + method,
            contentType: "application/json; charset=utf-8",
            data: JSON.stringify(data),
            dataType: "json"
        });
    };


    /**
     * Builds styled error label containing given message.
     * @param {message} message to be shown.
     */
    my.buildErrorLabel = function(message) {
        return $("<span class=\"ErrorLabel\" ></span>").html(message);
    };

    return my;
}(STRANDS || {}, $cmsj))