Reputation: 567
I am creating a WP7.1 Application with Phonegap. I have a html page in which I have added number of javascripts along with phonegap.js. When for the first time the page is loaded, everything works fine. But when i navigate back and come again to the same page, device ready is not called. Also I cannot call other functions in other js too.
Why this is happening? is there some error occurring in some js. How can i track it?
Thanks in advance.
Upvotes: 0
Views: 218
Reputation: 6572
Debugging Phonegap can be quite challenging because it often fails silently. Because your scripts appear to run the first time, it may not be a simple syntax error causing problems. Try running the scripts on a desktop browser with a JS debug console available and you may see some error messages there. Although Phonegap itself may not run, it is usually not too difficult to keep a compatibility layer with a desktop browser that will help you spot simple mistakes.
You can also look at using the remote Weinre debugger. This gives you a debug console for your development device which may show error messages that the dev environment itself doesn't. Try:-
You state that you are including Phonegap.js, presumably you are using a current version such as Phonegap 1.9.0?
Upvotes: 1