I am using phonegap with json .here i got a error
index/html
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no;" />
<script src="phonegap-1.2.0.js"></script>
<script src="js/jquery-1.5.min.js"></script>
<script src="js/load-json.js"></script>
<script>
function onBodyLoad() {
document.addEventListener("deviceready",onDeviceReady,false);
}
</script>
</head>
<body onload="onBodyLoad()">
<div id="output"></div>
</body>
</html>
Json.js
$(document).ready(function(){
$(document).bind( deviceready , function(){
var output = $( #output );
$.ajax({
url: http:192.168.1.3:8000/index ,
dataType: jsonp ,
jsonp: jsoncallback ,
timeout: 5000,
success: function(data, status){
$.each(data, function(i,item){
var landmark = <h1> +item.name+ </h1>
+ <p> +item.latitude+ <br>
+ item.longitude+ </p> ;
output.append(landmark);
});
},
error: function(){
output.text( There was an error loading the data. );
}
});
});
});
01-12 15:08:52.050: I/System.out(338): loadUrl(file:///android_asset/www/index.html)
01-12 15:08:52.050: I/System.out(338): url=file:///android_asset/www/index.html baseUrl=file:///android_asset/www
01-12 15:08:52.230: W/System.err(338): java.net.SocketException: Permission denied
01-12 15:08:52.230: W/System.err(338): at org.apache.harmony.luni.platform.OSNetworkSystem.socket(Native Method)
01-12 15:08:52.230: W/System.err(338): at dalvik.system.BlockGuard$WrappedNetworkSystem.socket(BlockGuard.java:335)
01-12 15:08:52.230: W/System.err(338): at org.apache.harmony.luni.net.PlainSocketImpl.create(PlainSocketImpl.java:216)
01-12 15:08:52.230: W/System.err(338): at org.apache.harmony.luni.net.PlainServerSocketImpl.create(PlainServerSocketImpl.java:40)
01-12 15:08:52.240: W/System.err(338): at java.net.ServerSocket.<init>(ServerSocket.java:120)
01-12 15:08:52.240: W/System.err(338): at java.net.ServerSocket.<init>(ServerSocket.java:74)
01-12 15:08:52.240: W/System.err(338): at com.phonegap.CallbackServer.run(CallbackServer.java:177)
01-12 15:08:52.240: W/System.err(338): at java.lang.Thread.run(Thread.java:1019)
01-12 15:08:53.299: D/szipinf(338): Initializing inflate state
01-12 15:08:53.299: D/szipinf(338): Initializing zlib to inflate
01-12 15:08:53.349: D/szipinf(338): Initializing inflate state
01-12 15:08:53.349: D/szipinf(338): Initializing zlib to inflate
01-12 15:08:54.819: D/PhoneGapLog(338): file:///android_asset/www/index.html: Line 13 : ReferenceError: Can t find variable: onDeviceReady
01-12 15:08:54.819: E/Web Console(338): ReferenceError: Can t find variable: onDeviceReady at file:///android_asset/www/index.html:13
01-12 15:09:15.029: D/dalvikvm(338): GC_CONCURRENT freed 361K, 52% free 2806K/5767K, external 884K/1038K, paused 6ms+4ms
01-12 15:09:45.860: I/System.out(377): loadUrl(file:///android_asset/www/index.html)
01-12 15:09:45.909: I/System.out(377): url=file:///android_asset/www/index.html baseUrl=file:///android_asset/www
01-12 15:09:46.299: W/System.err(377): java.net.SocketException: Permission denied
01-12 15:09:46.299: W/System.err(377): at org.apache.harmony.luni.platform.OSNetworkSystem.socket(Native Method)
01-12 15:09:46.299: W/System.err(377): at dalvik.system.BlockGuard$WrappedNetworkSystem.socket(BlockGuard.java:335)
01-12 15:09:46.299: W/System.err(377): at org.apache.harmony.luni.net.PlainSocketImpl.create(PlainSocketImpl.java:216)
01-12 15:09:46.299: W/System.err(377): at org.apache.harmony.luni.net.PlainServerSocketImpl.create(PlainServerSocketImpl.java:40)
01-12 15:09:46.299: W/System.err(377): at java.net.ServerSocket.<init>(ServerSocket.java:120)
01-12 15:09:46.299: W/System.err(377): at java.net.ServerSocket.<init>(ServerSocket.java:74)
01-12 15:09:46.299: W/System.err(377): at com.phonegap.CallbackServer.run(CallbackServer.java:177)
01-12 15:09:46.299: W/System.err(377): at java.lang.Thread.run(Thread.java:1019)
01-12 15:09:46.849: D/szipinf(377): Initializing inflate state
01-12 15:09:46.849: D/szipinf(377): Initializing zlib to inflate
01-12 15:09:46.869: D/szipinf(377): Initializing inflate state
01-12 15:09:46.869: D/szipinf(377): Initializing zlib to inflate
01-12 15:09:48.100: D/PhoneGapLog(377): file:///android_asset/www/index.html: Line 13 : ReferenceError: Can t find variable: onDeviceReady
01-12 15:09:48.100: E/Web Console(377): ReferenceError: Can t find variable: onDeviceReady at file:///android_asset/www/index.html:13
01-12 15:10:10.170: I/System.out(416): loadUrl(file:///android_asset/www/index.html)
01-12 15:10:10.249: I/System.out(416): url=file:///android_asset/www/index.html baseUrl=file:///android_asset/www
01-12 15:10:10.559: W/System.err(416): java.net.SocketException: Permission denied
01-12 15:10:10.559: W/System.err(416): at org.apache.harmony.luni.platform.OSNetworkSystem.socket(Native Method)
01-12 15:10:10.559: W/System.err(416): at dalvik.system.BlockGuard$WrappedNetworkSystem.socket(BlockGuard.java:335)
01-12 15:10:10.569: W/System.err(416): at org.apache.harmony.luni.net.PlainSocketImpl.create(PlainSocketImpl.java:216)
01-12 15:10:10.569: W/System.err(416): at org.apache.harmony.luni.net.PlainServerSocketImpl.create(PlainServerSocketImpl.java:40)
01-12 15:10:10.569: W/System.err(416): at java.net.ServerSocket.<init>(ServerSocket.java:120)
01-12 15:10:10.569: W/System.err(416): at java.net.ServerSocket.<init>(ServerSocket.java:74)
01-12 15:10:10.569: W/System.err(416): at com.phonegap.CallbackServer.run(CallbackServer.java:177)
01-12 15:10:10.569: W/System.err(416): at java.lang.Thread.run(Thread.java:1019)
01-12 15:10:11.080: D/szipinf(416): Initializing inflate state
01-12 15:10:11.080: D/szipinf(416): Initializing zlib to inflate
01-12 15:10:11.100: D/szipinf(416): Initializing inflate state
01-12 15:10:11.100: D/szipinf(416): Initializing zlib to inflate
01-12 15:10:12.359: D/PhoneGapLog(416): file:///android_asset/www/index.html: Line 13 : ReferenceError: Can t find variable: onDeviceReady
01-12 15:10:12.359: E/Web Console(416): ReferenceError: Can t find variable: onDeviceReady at file:///android_asset/www/index.html:13
01-12 15:10:32.759: D/dalvikvm(416): GC_CONCURRENT freed 362K, 52% free 2806K/5767K, external 884K/1038K, paused 6ms+4ms
01-12 15:11:42.329: D/dalvikvm(416): GC_CONCURRENT freed 489K, 54% free 2738K/5895K, external 884K/1038K, paused 6ms+3ms
01-12 15:12:45.579: D/dalvikvm(416): GC_CONCURRENT freed 426K, 55% free 2696K/5895K, external 884K/1038K, paused 6ms+3ms