Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Super Contributor
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified
Accepted Solution

how to Complile webWorks application in playbook

when i run my project on playbook it gives Network Error please try again leter.

 

i know error in javascript which i add in to the html page

.html file is not open in browser 

 

anyone knows how to debug the webworks application in playbook

 

 

BlackBerry Technical Advisor
Posts: 43
Registered: ‎05-04-2009
My Device: BlackBerry 9900
My Carrier: Bell

Re: how to Compile webWorks application in playbook

I had this problem at one point too.  The problem turned out to be that the config.xml specified index.htm as the start page instead of index.html.  If you're manually editing the config.xml file then you're looking for this tag:

 

 

<content src="index.html"/>

 

 

Contributor
Posts: 27
Registered: ‎01-20-2011
My Device: Bold
My Carrier: Developer

Re: how to Compile webWorks application in playbook

have you tried to change the index.htm to index.html?

 

Best Regards

 

William

---------------------------------------------------------------
Best Regards

William
Developer
Posts: 125
Registered: ‎01-17-2011
My Device: Playbook
My Carrier: Vodacom

Re: how to Complile webWorks application in playbook

 

If you expect that there's a problem in your javascript - then just use something like

 

 

alert("i got to this point in javascript");

 

 

if a messgebox with alert doesn't popup, then there is an error in code prior to the alert.

 

eg.:

 

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html>
<head>
    <title>Test HTML5 with Javascript</title>
    <script language=javascript type="text/javascript">
        alert("start of javascript - this should always get called unless javascript not supported");
        var elt;
        var context;

        function init() {
            alert("entering init() function");

            try {
                elt.ThisWillBreakJavascript();  // invalid javascript - but since in try statement, code execution will continue
            } catch (err) {
                alert("ERROR CAUGHT !- if no try-catch, then javascript would have broken here.");
            }
        }

        elt.ThisWillBreakJavascript();      // invalid javascript
        alert("Won't get here .... since javascript breaks in previous line");
    </script>
</head>

<body onload="init()">
    <h1>Test HTML with Javascript error</h1>
</body>
</html>

 

You can also use try-catch statements to trap any errors. If an error is caught then you can print additional exception information. (in this case would be "err.Description")

 

.H

 

 

 

Super Contributor
Posts: 306
Registered: ‎08-10-2010
My Device: Not Specified

Re: how to Complile webWorks application in playbook

now it works fine

i not zip one javaScript  file that's way it give network error.

 

we have to  zip all our   file(including Images,Html pages,Java Script ) .

if we miss any of the resource then it gives Network Error.