Grow your CSS skills. Land your dream job.

JQuery Mobile in IOS Full Screen App

  • # January 31, 2013 at 4:47 pm

    Hi,

    I Hope you guys can help me. Im learning JQuery/Javascript by making a little web app. the following code works fine in a browser AND in safari on IOS when not a full-screen webapp but if i add it to homescreen as an app, the page doesnt update with the records pulled in the javascript.

    All its supposed to do is generate an unordered list upon the #page being switched to.

    can anyone give me any pointers please?

    thanks in advance

    this is my javascript (main.js)

    $(document).delegate(‘#customers’, ‘pageshow’, function() {

    $(“#customerlist”).html(“loading”);

    $.ajax({
    type: “POST”,
    url: “getCustomers.php”,
    data: “”,
    cache: false,
    dataType: “text”,
    success: onSuccess
    });

    $(“#customerslist”).ajaxError(function(event, request, settings, exception) {
    $(“#customerslist”).html(“Error Calling: ” + settings.url + “
    HTTP Code: ” + request.status);
    });

    function onSuccess(data) {

    var result = JSON.parse(data);

    var outputstring = “

      “;
      $.each(result.customer, function(index, value) {
      //- extract target value like zipCode
      outputstring = outputstring + “
    • ” + value.name + “
    • “;
      });
      outputstring = outputstring + “

    “;
    $(“#customerslist”).html(outputstring);

    $(“#customerslist”).trigger(“create”);

    }

    });

    and this is my html

    < !DOCTYPE html>




    `

    My Settings

    INSITE touch

    Settings
    New Job


    • My Jobs Today6
    • Booked Today1
    • Booked This Week12

    Customers

    Home
    New Job


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".