Possible Duplicate:
phonegap form submission to remote server
Another question. If this one can be solved, I'll definitely can solve this one phonegap form submission to remote server.
So here's the code index.html
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<link href="jquery.mobile-1.0rc1.min.css" rel="stylesheet" type="text/css"/>
<link href="jquery.mobile.scrollview.css" rel="stylesheet" type="text/css"/>
<link href="index.css" rel="stylesheet" type="text/css"/>
<script src="jquery-1.6.4.min.js"></script>
<script src="jquery.mobile-1.0rc1.min.js"></script>
<script src="phonegap-1.0.0.js"></script>
<script>
function onLoad()
{
$('#content').load('http://xxx.com/xxx/get.php');
}
</script>
</head>
<body>
<div data-role="page" id="header">
<div data-role="header">
<h1>Header</h1>
</div>
<div data-role="content" id="content">
<input type="button" value="click" onClick="onLoad();">
</div>
<div data-role="footer" id="footer">
<h4>Footer</h4>
</div>
</div>
</body>
</body>
</html>
get.php
<?php
echo '<p>this is a test</p>';
?>
A very simple code, but it doesn't work. Can someone point out where did I do wrong? What I want to do is to get the response from get.php(remote server). So it would print "this is a test" from get.php into #content div in index.html. Thanks in advance.