I'm doing an app to Android. In my application the user have to insert the name, the email, cell phone number and a message. When I click in "Send" the message will be dispatched. But if it is not being performed. Here is my code. What's wrong? If you have another solutions..
message_send.addEventListener('click',function() { var params = { 'name':field_name.value, 'email': field_email.value, 'number': field_number, 'message': message };
var xhr = Ti.Network.HTTPClient({
onload : function(){
Ti.API.info('----on load: ' + JSON.stringify(e));
},
onerror : function(e){
Ti.API.info('----on error: ' + JSON.stringify(e));
},
});
xhr.open("POST", 'http://89.237.149.36/ws/resources/clm/newclm');
xhr.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
xhr.send(params);
});