Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User milkman21's Avatar
    Join Date
    May 2010
    Posts
    1
    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 henry.huang's Avatar
    Join Date
    Mar 2010
    Posts
    6
    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 C++
    Replies: 14
    Last Post: 2009-04-20, 12:44
  3. Theme Studio 3.1 not creating themes
    By zemm in forum Themes/Carbide.ui
    Replies: 11
    Last Post: 2008-10-18, 08:41
  4. Compilation series 60 3rd edition
    By asmobease in forum Symbian Tools & SDKs
    Replies: 32
    Last Post: 2006-09-13, 09:46
  5. Compilation series 60 3rd edition
    By asmobease in forum Symbian C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved