var args = arguments[0] || {};
$.atn.text=args.attendance;
Ti.API.info('attendance:'+args.attendance);
function doClick(e){
$.atn.value=$.atn.value+1;
Ti.API.info('atn is'+$.atn.value);
var url = "api.usergrid.com/PRI_95616/LOGIN/attendances?";
var client = Ti.Network.createHTTPClient({
onload : function(e) {},
onerror : function(e) {
Ti.API.debug(e.error);
alert('error');
},
timeout : 5000 // in milliseconds
});
client.setRequestHeader('content-type', 'JSON');
client.open("PUT", url);
client.send(JSON.stringify(jsonobject));
}
我想获取然后更新出勤值,然后在数据库中插入更新的值。我该怎么做?