×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    188

    use the options menu to change views in WRT widget

    i used following code to change views in WRT widget. when i test it using n5800 touch screen phone, it is not working properly.

    if i select the option menu "gotonextpage" it doesn't go to the second screen

    but, after selecting option menu "gotonextpage", if i touch in the screen, it goes to the second screen

    what is the problem. pleas help me


    function createMenu()
    {

    // Create a Menu Object
    var optionsMenu = window.menu;

    // Create Menu items
    var m1 = new MenuItem('gotonextpage', 2001);

    // Assign a callback function for the menu items
    m1.onSelect = menuEventHandler;

    // Append two Menu items to Menu
    optionsMenu.append(m1);
    }

    // Implement menu event handler:
    function menuEventHandler(id) {
    switch (id) {
    case 2001:
    showsecondscreen();
    break;

    }
    }

    function showsecondscreen()
    {
    document.getElementById("header").innerHTML = "this is second screen";


    widget.prepareForTransition('fade')
    document.getElementById("firstscreen").style.display = 'none';
    document.getElementById("secondscreen").style.display = 'block';
    widget.performTransition();


    }

    thanks in advance

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

    Re: use the options menu to change views in WRT widget

    Hello,

    Could you post the full code?

    I tried with two 5800 xm devices and different firmwares and they both seem to work ok. Maybe there is something in your code that prevents the view switch?

    Br,
    Ilkka

Similar Threads

  1. createImage() exceptions
    By apnasi in forum Mobile Java General
    Replies: 62
    Last Post: 2010-07-24, 16:16
  2. Touch UI and pop-up menu options
    By nicholso in forum Mobile Java General
    Replies: 2
    Last Post: 2009-12-22, 10:56
  3. Replies: 1
    Last Post: 2009-12-20, 05:28

Posting Permissions

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