Reputation: 23
I am trying to create an app that would be compatible and working on all the platforms. For the development of my app I have chosen Phonegap. I have tested my code on iOS and Android and it works fine as I tested it on device as well weas emulator. But when I tested the same code on Blackberry (using phonegap and blackberry webworks, running the emulator through command prompt on Windows), it doesnt recognise or execute the code i have written in the tag. Basically I have various tags with 2-3 javascript files included and thus it doesnt execute any of the scripts in it. So because of this interface, core functionality is lost and a blank screen is all I get. I have tested the simple Javascript alert function by putting it in page load event of body tag and it works fine.
Can anyone please tell me what could be the possible reason for this? Please do help me out with this as I am not move forward because of this problem. Any help would be much appreciated. :)
Cheers, Prajakta
Upvotes: 0
Views: 657
Reputation: 1030
PhoneGap blackberry does not support deviceready event. we need to manuaaly check if PhoneGap is loaded by using PhoneGap.available method
Upvotes: 1
Reputation: 394
I have also same error. To solve this remove
document.addEventListener("deviceready", onDeviceReady, false);
put all code in
$(document).ready(function() {
}
Upvotes: 1