×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    1

    JavaScript not loading

    Hi guys,

    I have a basic Nokia WRT app. I have a trivial problem, but its driving me crazy.

    The onLoad method in the standard generated (index.html) HTML calls a method init inside the basic JS. This in turn should call a method in some other JS file.

    This does not work for some reason. Here's my code.

    index.html
    Code:
    <body onLoad="javascript:init();">
            <span id="ad"></span>
            <script type="text/javascript">
            </script>
        </body>

    basic.js
    Code:
    function init(){
    alert ("inside basic");
    var myVar = new UtilCalss();
    myVar.testFunc();
    
    }
    Inside the UtilClass.js code is as follow

    Code:
    function UtilCalss(){
    
    function testFunc(){
    alert ("inside test func");
    }
    
    
    }
    Both classes are in the same folder. Why is my testFunc not being invoked?

    Thanks for your advice in advance.

  2. #2
    Registered User
    Join Date
    Mar 2010
    Posts
    6

    Re: JavaScript not loading

    Hi,

    Modify your UtilCalss to

    Code:
    function UtilCalss(){
        this.testFunc = function(){
           alert ("inside test func");
        }
    }
    Have a try

Similar Threads

  1. Replies: 2
    Last Post: 2010-03-11, 16:37
  2. MBM image is not found
    By tamhanna in forum Symbian
    Replies: 14
    Last Post: 2009-04-20, 12:44
  3. Compilation series 60 3rd edition
    By asmobease in forum Symbian Tools & SDKs
    Replies: 32
    Last Post: 2006-09-13, 09:46
  4. Compilation series 60 3rd edition
    By asmobease in forum Symbian
    Replies: 3
    Last Post: 2006-09-10, 14:08

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×