Hi..
I am working with Folder Rules. I want a POST method to be executed when a file is created in the folder. I upload the JS file to the SCRIPT directory. I have everything configured. This is the content of my file
function traer(){
var user = "Luis";
var name ="Diaz";
//alert("Nombre: " + user + " Apellido: " + name);
$.ajax({
type: "POST",
url: "http://localhost/alfresco/index.php/wp-json/gf/v2/workflow/webhooks/10/Fytn4QUNj9XWrzcvRzAPG79CB",
data:{Nombre:user, Apellido:name},
success: function(data)
{
alert ("Muy bien");
}
});
} // Cierra de la funcion TRAER
traer();
This works fine in my custom code but in Alfresco it doesn't work for me.
This is my error
20 KB (Error: Failed to execute script 'workspace://SpacesStore/f2d8d60b-6bcd-425e-9b5c-6927b42d44f3': 04130025 ReferenceError: "jQuery" is not defined. (workspace://SpacesStore/f2d8d60b-6bcd-425e-9b5c-6927b42d44f3#6)) | |
It does not detect the Jquery tag nor $ .Ajax