Thanks Illya, still having issues,
I notice that a couple of the calls on the network stack return a status of 304- not modified. I assumed that every status other than 200 is an error condition. Am I right?
I am still not sure of the syntax for the js on the checkbox. The next few lines is taken from the javascript sent:
/*
Nonvisual components
*/
var datasources = [];
restservice1 = new Apperyio.DataSource(DougiesDB_signup_service, {
'onBeforeSend': function(jqXHR) {
},
'onComplete': function(jqXHR, textStatus) {
Code: Select all
Apperyio.refreshScreenFormElements("RegistrationScreen");
},
'onSuccess': function(data) {
Apperyio.navigateTo('LoginScreen', {
reverse: false
});
},
'onError': function(jqXHR, textStatus, errorThrown) {
var response = JSON.parse(jqXHR.responseText);
alert(response.description);
},
'responseMapping': [{
'PATH': ['id'],
'ID': 'local_storage',
'ATTR': 'userid'
}, {
'PATH': ['sessionToken'],
'ID': 'local_storage_',
'ATTR': 'userSessionToken'
}],
'requestMapping': [{
'PATH': ['X-Appery-Database-Id'],
'TYPE': 'STRING',
'HEADER': true,
'ATTR': '{database_id}'
}, {
'PATH': ['username'],
'TYPE': 'STRING',
'ID': 'Username',
'ATTR': 'value'
}, {
'PATH': ['password'],
'TYPE': 'STRING',
'ID': 'Password',
'ATTR': 'value'
}, {
'PATH': ['FirstName'],
'TYPE': 'STRING',
'ID': 'Firstname',
'ATTR': 'value'
}, {
'PATH': ['LastName'],
'TYPE': 'STRING',
'ID': 'Lastname',
'ATTR': 'value'
}, {
'PATH': ['Address1'],
'TYPE': 'STRING',
'ID': 'AddressLine1',
'ATTR': 'value'
}, {
'PATH': ['Address2'],
'TYPE': 'STRING',
'ID': 'AddressLine2',
'ATTR': 'value'
}, {
'PATH': ['Postcode'],
'TYPE': 'STRING',
'ID': 'Postcode',
'ATTR': 'value'
}, {
'PATH': ['Email'],
'TYPE': 'STRING',
'ID': 'EmailAddress',
'ATTR': 'value'
}, {
'PATH': ['Delivery'],
'TYPE': 'STRING',
'ID': 'Delivery',
'ATTR': 'value',
'TRANSFORMATION': function(value) {
if ($("#RegisterScreen_Delivery").checked) {
$("#RegisterScreen_Delivery").val = true;
} else {
$("#RegisterScreen_Delivery").val = false;
}
}
}]
});
I am guessing that is still not quite right as the following are the response headers after clicking register:
Request URL:https://api.appery.io/rest/1/db/users
Request Headers CAUTION: Provisional headers are shown.
Accept:application/json, text/javascript, /; q=0.01
Content-Type:application/json
Origin:http://appery.io
Referer:http://appery.io/app/view/3bf3be04-f5...
User-Agent:Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36
X-Appery-Database-Id:53514a80e4b0e44dd02714be
Request Payloadview source
{username:tommy2, password:ravine, FirstName:Terry, LastName:Gilliver, Address1:hgjhg,...}
Address1: "hgjhg"
Address2: "jhgjhgjh"
Delivery: "false"
Email: "a href="mailto:terry@mrtaxsoftware.com" rel="nofollow"terry@mrtaxsoftware.com/a"
FirstName: "Terry"
LastName: "Gilliver"
Postcode: "LE65 2NY"
password: "ravine"
username: "tommy2"
This clearly shows that value of Delivery is till false even though I clicked the checkbox, so there is an error in my javascript somewhere. Also what does the Caution at the top of the header mean?
Thanks, Terry