Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User suryasraj's Avatar
    Join Date
    Jul 2010
    Posts
    17
    Hello,

    I am getting the following error in console log when selecting an item from a dropdown list.

    TypeError: Result of expression 'selects[k].options[selects[k].selectedIndex]' [undefined] is not an object.

    I am using Nokia Web tools 1.5 and here is my code.

    <select onchange="stateSelected();">
    <option value=1>Value1</option>
    <option value=2>Value2</option>
    <option value=3>Value3</option>
    </select>


    The function has just an alert inside.

    Please let me know if you have seen this error before.

    Regards,
    Surya

  2. #2
    Nokia Developer Moderator isalento's Avatar
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    832
    Hi,

    You could try alternative method:
    Code:
    var selList = document.getElementById("selectList");
    selList.options[selList.selectedIndex].value
    In addition Alert is not supported, so you might want to use console.log in simulator.

    Br,
    Ilkka

  3. #3
    Registered User suryasraj's Avatar
    Join Date
    Jul 2010
    Posts
    17
    Thank you Ilkka, I am now using console.log.

    But I am afraid this suggestion may not resolve the issue. The problem occurs when I assign a function to handle onchange event. The onchange event handler is not called when selection changes, but error appears in log.

    Rg,
    Surya

Similar Threads

  1. dropdown list
    By koraykayir in forum Symbian User Interface
    Replies: 3
    Last Post: 2010-11-02, 15:56
  2. Can I get dropdown list ID or name?
    By bartx in forum Python
    Replies: 1
    Last Post: 2009-12-09, 18:03
  3. how to implenment dropdown list ?
    By tlr in forum Symbian User Interface
    Replies: 9
    Last Post: 2009-04-15, 08:09
  4. how to show a new form while selecting a list item...
    By josephcarmel in forum Mobile Java General
    Replies: 2
    Last Post: 2009-03-07, 08:12
  5. Dropdown List or wheels ?
    By PopAndDestroy in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-02-08, 17:31

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