I read https://backendless.com/documentation/data/js/data_updating_data_objects.htm but I did not find good JS examples. I need to change column “rating” in item of the table. This code is wrong:
var savedItems = Backendless.Persistence.of( Items );
var changeItems = savedItems.find().data[0].rating = "1";
savedItems.save( changeItems );
and this one also:
$.ajax({
url: 'https://api.backendless.com/v1/data/Items/08BEF67E-FDDE-61B6-FF66-25EA83E7B300',
type: 'PUT',
data: {"rating" : 1},
success: function() { alert('PUT completed'); }
});
“XMLHttpRequest cannot load https://api.backendless.com/v1/data/Items/08BEF67E-FDDE-61B6-FF66-25EA83E7B300. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://localhost’ is therefore not allowed access. The response had HTTP status code 401.”
Im sorry for my low skill. I have not worked with server-side yet. I don
t know obout REST, give me examples please.