webscript from a button

Showing results for 
Search instead for 
Did you mean: 
Active Member

webscript from a button

I am trying to invoke a custom java backed webscript from a button I created in a custom widget js file.
here is my code : 

var id=5
var myButton = new AlfButton({
label: "Supprimer",
onClick: function(){
var url = Alfresco.constants.PROXY_URI + "test/delete?id="+id;

this.serviceXhr({url : url,
method: "GET"});

the button is being displayed and when I try a simple alert message, it works good.
but when I try the previous code, nothing happens. Any ideas ?

1 Reply
Alfresco Employee

Re: webscript from a button