×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2010
    Location
    Trivandrum ,Kerala
    Posts
    139

    How to create menu object

    I tried to create 'menu object' in my application(Symbian ^3),but it is not working with <iframe>tag,the menu item disappears soon after loading "gmail".(It works fine with old firmware)

    HTML code:
    <body onload="init();">
    <iframe id="server">
    </iframe>
    </body>

    Javascript code:

    var menuid;
    function init()
    {

    createMenu();
    document.getElementById('server').src = "http://www.gmail.com";
    }


    function createMenu()
    {
    menuhome = new MenuItem("About", 1);
    window.menu.append(menuhome);
    menuhome.onSelect = menuEventHandler;


    }



    function menuEventHandler(menuid)
    {
    switch (menuid)
    {

    case 1:
    alert("Gmail");
    break;
    }
    }


    Please help me.I am facing the same problem with Symbian Anna as well as Symbian Belle.I think this issue due to HTML5 browser. Is it? any another solution for wrapping a website?
    Last edited by sreerajvr; 2011-10-18 at 05:13.
    sreerajvr

  2. #2
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: How to create menu object

    Hi,

    I can replicate this as well. I would suggest you to develop custom menu and use it instead of built in one.
    One possible workaround is to rebuild the menu after iframe is loaded. I don't know how robust this is, but seems to do the trick.

    Code:
    var iframe = document.getElementById('server');
    iframe.onload = function(){		
       createMenu();
    }
    iframe.src = "http://www.gmail.com";
    -Ilkka

  3. #3
    Registered User
    Join Date
    Oct 2010
    Location
    Trivandrum ,Kerala
    Posts
    139

    Re: How to create menu object

    Thank you so much
    sreerajvr

Similar Threads

  1. How to create and save object to put in another qml?
    By VVNart in forum [Archived] Qt Quick
    Replies: 4
    Last Post: 2011-05-08, 06:57
  2. Unable to create Object of CTelephony
    By mittali in forum Symbian C++
    Replies: 10
    Last Post: 2009-06-23, 12:34
  3. How to create a text object ?
    By hydlx in forum Symbian Tools & SDKs
    Replies: 9
    Last Post: 2006-07-31, 06:43
  4. Menu Select button using List object
    By abstractworlds in forum Mobile Java General
    Replies: 4
    Last Post: 2002-12-09, 13: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
  •