webscript from a button

cancel
Showing results for 
Search instead for 
Did you mean: 
riadhazzouz
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"});
}
});
domConstruct.place(myButton.domNode,"id");

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
angelborroy
Alfresco Employee

Re: webscript from a button