Hi Katya, i did try your method at first and then i went with the local storage method because Im assumimg im getting a false response from my server. My server sends a false responds when it doesnt receive a valid driver_id. Now, I went back to your mapping method and i reviewed my database. It does write a new record to the DB even with the correct driver_id in the DB.
Next thing i did is delete that error popup from the JS i wrote that attached to the submit_load2 service on success action (invoke JS). Originally, the JS was written like this (and it worked fine when i had the static list in the select menu):
if(data.response==="true") {
$.mobile.changePage("load_submitted.html", {transition: "pop"});
}
else {
$.mobile.changePage("load_not_submitted.html", {transition: "pop"});
So, naturally since my 1st test with the static list (in the select menu) worked fine I assumed the same code above would also work. Then, what I did just to see if i even get the 'load_submitted' popup to come up, i rewrote the code like this:
if(data.response==="true") {
$.mobile.changePage("load_submitted.html", {transition: "pop"});
}
if(data.response==="false") {
$.mobile.changePage("load_submitted.html", {transition: "pop"});
}
else {
$.mobile.changePage("load_submitted.html", {transition: "pop"});
As you can see, all available options point only to 'load_submitted' -- how is it even possible with the last code i still end up with 'load_not_submitted'??