I am working with phonegap and dreamweaver to setup a small application but i am facing a problem as i am a new in phonegap.
I have an HTML5 file and my css file also the config.xml form my icon, splashscreen etc. Phonegap reads only the index.html and not the index.php file.
So i made a grab.php file to pull some data from my hosting. Localhost everything works great but when i am build the app it doesn't load the data...
Here is my html file and grab.php file.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no" />
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<title>Celebrity.Com | Android App</title>
<link rel="stylesheet" type="text/css" href="mobile_css/style.css" media="all" />
<script type="text/javascript" src="js/jquery-2.0.3.min.js"></script>
<script type="text/javascript" src="phonegap.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript">
app.initialize();
</script>
<script type="text/javascript">
$(document).ready(function() {
$(".loa").load("grab.php");
});
</script>
</head>
<body>
<div class="headerHolder"><div class="logo"></div></div>
<div style="width:100%; height:20px; float:left; margin-bottom:1px;"></div>
<div class="loa" style="width:100%; padding-bottom:5px;">
<div style="clear:both;"></div>
</div>
</body>
</html>
And grab.php
<?php
require "connectiondb.php";
$bann = mysql_query ("SELECT * FROM info ORDER BY a_name");
while($bannerl = mysql_fetch_assoc($bann)) {
echo '
<div class="articleHolder">
<div class="imageholder"><img src="'.$bannerl['a_image'].'" width="180" height="120"/></div>
<div class="controlz"><span style="float:left;">'.$bannerl['a_name'].'</span><img style="width:65px; height:65px; float:right;" src="images/details.png" width="65" height="65" border="0"></div>
</div>';
}
?>
I tried to upload the grab.php file to my server and load it from here but i think that the policy doesn't let me to run, load files from other servers.