android - Javascript code doesn't work on phonegap -


i read @ link there's not discussion or info (of questioner).

i'm writing , android app using phonegap in eclipse development environment. it's starter code... simple don't understand why isn't working.

i have index.html js function (jquery, jquery-mobile , cordova 2.9 included) takes json remote server , append jquery mobile list:

$(document).bind('deviceready', function() {   $.getjson("http://www.remote-server.com/json.php?return=list",function(json) {     $.each(json,function(i,item){       $("#list").append('<li><a href="details.html?id=' + item.id + '"><h2>'+item.title+'</h2><p>start date:'+item.start+'</p></a></li>');     });     $("#list").listview('refresh');        }); }); 

ok, until it's ok. when open details.html, can't execute js code. @ beginning thought it's problem of includes or tried simple javascript code setting manually text's tags like: document.getelementbyid('title').value = "f!&k"

do miss something? config.xml it's standard starter code.

where javascript located?

if need javascript available @ more 1 page should put in head of of pages.

if need javascript available in single page, should put javascript inside the

<div data-role='page'> 

that defines jquery-mobile page need it.

this because of ajax navigation model of jquery mobile.

hope helps.


Comments