I should really know this….it’s basic….I’m trying to send the user to a another screen , after they send a email using the IOS email system. Any help would be appreciated thank you.
so after they click on send or even after the 3rd party mail system has appeared on top of the app, some kind of confirmation/thank you screen. basically i’m trying to call two functions however one is mailto and another is gotoscreen at the same time
many thanks in advance guys
This isn’t working, its doing the error checking, and launching the email app with all the variables filled but not going to confirmation screen
phoneui.documentReadyHandler = function() {
}
$(‘#m1-BigBrotherApp11-custom1’).live(“click”, function() {
var error = 0;
var firstname = $(‘#m1-BigBrotherApp11-textField1’).val();
var surname = $(‘#m1-BigBrotherApp11-textField2’).val();
var email = $(‘#m1-BigBrotherApp11-textField3’).val();
var phone = $(‘#m1-BigBrotherApp11-textField4’).val();
var message = $(‘#m1-BigBrotherApp11-textArea1’).val();
if(firstname == ”) {
error++;
}
if(surname == ”) {
error++;
}
if(email == ”) {
error++;
}
if(message == ”) {
error++;
}
if (error > 0) {
alert(‘Please fill in all the fields.\nThe phone field is optional.’);
} else {
//submit the form
//———————————————————-
phoneui.composeEmailFromPage($(‘#m1-BigBrotherApp11’), mailto:’sales@example.com‘, ‘Customer Query via App’, ‘subject=${subject}\r\n\r\nFirst Name: =${textField1} \r\nSurname: =${textField2} \r\nPhone: =${textField3} \r\nEmail: =${textField4} \r\n\r\nProduct: =${textArea1} \r\nQuestion: =${textArea2} ‘);
phoneui.gotoScreen(‘m1-thankyouscreen’, ‘SLIDE_LEFT’);
//———————————————————-
} //if else
return false;
});