0

my code work fine on webbrowser and iphone, but page (#fichier_clients) leave blank on android devices.

help be very appreciate,

html

<!DOCTYPE html> 
<html> 
<head> 
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css">
<link rel="stylesheet" href="css/styles.css">
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery.mobile-1.3.1.js"></script>
<script src="js/gmao.js"></script>
.

in same page, div to receave results

<div id="fichier_clients" data-role="page"  data-add-back-btn="true">
<div data-role="header" data-position="fixed">
    Fichier Clients
</div>
<div data-role="content">
     <ul id="employeeList" data-autodividers="true" 
data-role="listview" 
data-filter="true"></ul>
</div>      
</div>

javascript (gmao.js)

$(document).on('pageshow', '#fichier_clients' ,function(){
alert("fichier clients");
getEmployeeList();
});

function getEmployeeList() {

$.getJSON(serviceURL + 'fichier_clients.php', {database:database}, function(data) {
    $('#employeeList li').remove();
    clients = data.items;
    $.each(clients, function(index, clients) {
        $('#employeeList').append('<li>
   <a href="accueil_gmao.html? numero_client=' + clients.numero_client 
 + '#fiche_client"    data-ajax="false">' +
                '<h4>' + clients.client + '</h4>' +
    '<span class="ui-li-count">' + clients.numero_client + '</span></a></li>');
    });
    $('#employeeList').listview('refresh');
});
}
gouly
  • 5
  • 4
  • $.getJSON this method doesn't work correctly with android less than 4 i try it more time and finally implement the normal $.Ajax and it work with me perfectly – mohammed momn Jan 20 '14 at 01:04
  • With $.Ajax , i have same issue = black page :$.ajax({ url: url, type: "GET", dataType: "json", data : "database="+database, success: function(data) { code...} – gouly Jan 20 '14 at 10:31
  • your data format is invalid json format it should be data : JSON.stringify({database:"database"}), success :function (){....} – mohammed momn Jan 20 '14 at 17:48

0 Answers0