Tengo el siguiente escenario:
function myHandlerFunction(data){ //do anything with data... } function ajaxHTTP(url, dataPost, funct){ $.ajax({ type: "POST", url: url, data: dataPost, dataType: "html", success: function(data){ funct(data); //Response is coming as plain-text }, error: function(errMsg) { } //To see the error message, use the var of parameter }); } ajaxHTTP("https://example.com", { field: "value" }, myHandlerFunction);Está funcionando bien, pero necesito pasar parámetros en el método myHandlerFunction, ¿cómo puedo hacer eso?
Es posible: ajaxHTTP("https://example.com", { field: "value" }, myHandlerFunction(arg1, arg2));