facebook

Confirmation screen after sending email.

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #337373 Reply

    Peacemaker
    Member

    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;
    });

    #337377

    Brandon
    Member

    Without actually testing the code my first thought is since it is opening a different app that is stopping the page transition.
    You could call the the page change just before sending the email. Or you could even call it in the page transition when it is finished going to the confirmation page.

    A final thought is to use php which will actually send the mail without leaving the app as well as giving a real confirmation on the sending or an error message if it doesn’t.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Confirmation screen after sending email.

You must be logged in to post in the forum log in