BlackBerry WebWorks with OS 5, text not showing

836 views Asked by At

I'm at the very early stages of writing a BlackBerry app using WebWorks. I'm aiming at mainly OS6 devices (Torch), but I need it to be compatible with OS5 for a small number of users who'll be using older devices. As far as I'm aware, WebWorks should work on OS5, however I have created a basic app with a hyperlink, and the text doesn't show on the OS5 simulator (it works fine on the OS6 simulator). All it shows is a blank screen. I've tried to just put some text on the app (i.e. not in hyperlink tags) and this doesn't show either.

HTML file as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
    <head>
        <meta name="viewport" id="viewport" content="height=device-height,width=device-width,user-scalable=no" />
        <title>My App</title>
        <script type="text/javascript" language="jscript" src="http://localhost/PubInfo/scripts.js" />

    </head>
    <body>

        <a href="#" onclick="displayModel()">Click to show device model.</a>


    </body>
</html>

You'll notice the only unusual thing I've done (and this is reflected in the config.xml to load the index.htm) is to reference the script file from localhost so I can amend the app without recompiling, again this works fine in OS6 so I don't think it's this that is causing the problem.

I'm developing using the WebWorks Plugin for Visual Studio on Windows 7 (x64). Apart from referencing the files from localhost, everything else is default, i.e. as it is set up when you create a new project.

Has anybody come across a similar problem, and if so what was your workaround? Any help would be appreciated.

1

There are 1 answers

0
Vikas On

Its because your script is not well written (completed):

Also update your meta tags.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>My App</title>
<script type="text/javascript" language="jscript"
    src="http://localhost/PubInfo/scripts.js"></script>

</head>
<body>
    <a href="#" onclick="displayModel()">Click to show device model.</a>
</body>
</html>