﻿// strUrl ==> the location off the file with filename, followed by / with the method name. Remember the method must be a [WebMethod()] and public
// strParams ==> if no params just call null from the function you use to call this. is Params use {'':''} so it looks like a array
// OnSuccessFunction ==> This is the function that is used to handle the results

function AjaxPostCall(strUrl, strParams, onSuccessFunction)
{
    if(strParams == null)
    {
        strParams = "{}";
    }

    $.ajax({
        type: "POST",
        url: strUrl,
        data: strParams,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: onSuccessFunction
        
    });
}

function AjaxGetCall(strUrl)
{
    $.ajax({
        type: "GET",
        url: strUrl,
        success:function(msg){
                alert(msg);
            }
    });

}