Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP data is endless loading, jquery, phonegap
    primarykey
    data
    text
    <p>I'm working on an iOS app with phonegap and jQuery mobile.</p> <p>When I make an AJAX request to a PHP file which includes just a simple 1 to 10 counter (and echoes these numbers), everything is fine and shows up when the app starts.</p> <p>But when I request a PHP file which is a little bit more complex, the app is loading and loading and loading and nothing happens.</p> <p>Here's the PHP file</p> <pre><code>&lt;?php include 'connect.php'; $data = mysql_query('SELECT * FROM pics ORDER BY `date` DESC') or die(mysql_error()); while($info = mysql_fetch_array( $data )) { &lt;div id='thumbwrapper'&gt;"; Echo "&lt;img src=../images/".$info['thumb']." class='thumb'&gt;&lt;/a&gt;"; Echo "&lt;/div&gt;&lt;/a&gt;"; } ?&gt; </code></pre> <p>And here's the ajax request</p> <pre><code>&lt;script typ="text/javascript"&gt; $(document).ready(function(){ $("#randomdiv").load("http://localhost/test.php"); }); &lt;/script&gt; &lt;div id="randomdiv"&gt;&lt;/div&gt; </code></pre> <p>PS: and yes, I've added "*" to the ExternalHosts in cordova.plist</p> <p>EDIT 1: i think i know where the problem is. today i wanted to let me show the test.php file via another browser (firefox), and this browser asked me for a username and password, before he showed me the php file.</p> <p>maybe the app is loading and loading and loading because nobody inputs a username and passwort. my question is, where could i explain what the username and passwort is?! (in the app). or where could I switch this thing off in xampp? (username (xampp) and passwort (empty) are the standard things).</p> <p>thanks.</p>
    singulars
    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.
 

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