简体   繁体   中英

Blackberry webworks and phonegap not executing <script> tags

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

PhoneGap blackberry does not support deviceready event. we need to manuaaly check if PhoneGap is loaded by using PhoneGap.available method

I have also same error. To solve this remove

document.addEventListener("deviceready", onDeviceReady, false);

put all code in

$(document).ready(function() {

}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM