Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery Mobile doesn't work on android's browser
    primarykey
    data
    text
    <p>I'm trying to build a webbapp with jQuery Mobile. App works fine on chrome, firefox, safari and on iPhone/iPad but on android it doesn't show data. What could be the reason?</p> <p>Here is the code I use:</p> <pre><code>$('#detailsPage').live('pageshow', function(event) { var id = getUrlVars()["id"]; $.getJSON(serviceURL + 'getdata.php?id='+id, displayData); }); function displayData(data) { var address = data.item; console.log(address); $('#osoite').text(address.OSO); $('#aika').text(address.AIKA); } function getUrlVars() { var vars = [], hash; var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&amp;'); for(var i = 0; i &lt; hashes.length; i++) { hash = hashes[i].split('='); vars.push(hash[0]); vars[hash[0]] = hash[1]; } return vars; } </code></pre> <p>When I use the app with chrome, console gives the right object, but when I use eclipse's android emulator, console gives false.</p> <p><strong>EDIT</strong> Here is javascript code from the page that links to the page that doesn't work on android:</p> <pre><code>$('#ListPage').bind('pageinit', function(event) { getList(); }); setInterval ( "getList1()", 10000 ); var vanhadata = ""; function getEmployeeList1() { $.getJSON(serviceURL + 'getemployees.php?' + formArray, function(data) { if(JSON.stringify(data) != JSON.stringify(vanhadata)){ // vanhadata is not same as new data $('#nollalista li').remove(); keikka = data.key; $.each(keikka, function(index, lista) { $('#nollalista').append('&lt;li&gt;&lt;a href="keikka.html?id=' + lista.IND + '"&gt;' + '&lt;h4&gt;' + lista.OSO + '&lt;/h4&gt;' + '&lt;img src="pics/' + lista.TILA + '.png"/&gt;' + '&lt;p&gt;' + lista.AIKA + '&lt;/p&gt;' +'&lt;/a&gt;&lt;/li&gt;'); }); $('#nollalista').listview('refresh'); if(vanhadata != "") alert(localStorage.getItem("server")); vanhadata = data; } }); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload