Results 1 to 4 of 4

Thread: Sending and retrieving data app/server, Native

  1. #1

    Default Sending and retrieving data app/server, Native

    Hello,

    I have read both documentation and some other threads how to send, retrieve and update information from an Sencha app to a web server.

    The thing I don't understand is how I can send, retrieve and update data to a web server if the app runs in native mode. If I understand right the Ajax function retrieving data is if you run the app on the web server by default (not native app) and the JsonP function is if you wan't to retrieve data between to sites like this:

    domainA.com (where the app is, not native here either) <-> domainB.com (other info)

    So my question is. How do you send, retrieve and update data from/to a web server if your app runs native?

  2. #2
    Sencha User
    Join Date
    Mar 2012
    Posts
    55
    Answers
    1

    Default

    You mean you're app is on an ipad and you want to do a request to you're server?

    It is possible just like you do it on the same server.
    The only thing you have to do is telling you're sandbox from the ipad to allow the IP of you're server

  3. #3

    Default

    Exactly. I wan't the app to run on the iPhone/iPad in native mode and not on the web server.

    So I can use the following Ajax function: http://docs.sencha.com/touch/2-0/#!/api/Ext.Ajax?

  4. #4
    Sencha User
    Join Date
    Mar 2012
    Posts
    55
    Answers
    1

    Default

    Yes,
    Something like this:
    Code:
    Ext.Ajax.request({
                url: 'http://192.168.1.12/test.php',
                method: 'POST',
                params: formValues,
                success: function(response, opts) {
                    console.log(response.responseText);
                },
                failure: function(response, opts) {
                    console.log('server-side failure with status code ' + response.status);
                }
    });

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •