简体   繁体   English

黑莓网络和phonegap没有执行<script> tags

[英]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. 为了开发我的应用程序,我选择了Phonegap。 I have tested my code on iOS and Android and it works fine as I tested it on device as well weas emulator. 我已经在iOS和Android上测试了我的代码,它在我在设备上测试它以及我们的模拟器时运行良好。 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. 但是当我在Blackberry上测试相同的代码时(使用phonegap和blackberry webworks,在Windows上通过命令提示符运行模拟器),它无法识别或执行我在标签中编写的代码。 Basically I have various tags with 2-3 javascript files included and thus it doesnt execute any of the scripts in it. 基本上我有各种标签包含2-3个javascript文件,因此它不会执行其中的任何脚本。 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. 我已经测试了简单的Javascript警报功能,将它放在body标签的页面加载事件中,它工作正常。

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 干杯,Prajakta

PhoneGap blackberry does not support deviceready event. PhoneGap黑莓不支持deviceready事件。 we need to manuaaly check if PhoneGap is loaded by using PhoneGap.available method 我们需要使用PhoneGap.available方法手动检查PhoneGap是否已加载

I have also same error. 我也有同样的错误。 To solve this remove 解决这个问题

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

put all code in 将所有代码放入

$(document).ready(function() {

}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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